-
Notifications
You must be signed in to change notification settings - Fork 773
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Copy clobber flag never err even when true #272
Comments
I'm asking myself as well: Is there any way at all to determine, if the file content was copied, when |
@ryancmlee @qqilihq Good points. @jprichardson Thoughts? |
Yep, this is a bug. If |
OK, will investigate. |
The issue is https://github.com/jprichardson/node-fs-extra/blob/master/lib/copy/ncp.js#L92. @jprichardson Should I attempt to create a fake |
@RyanZim yep, I think that'd be fine. |
@jprichardson Creating a fake |
@RyanZim what about... const err = new Error(file + ' already exists.')
err.code = EEXIST ? |
I guess that will cover most cases; still will have a JS stack trace, IDK. Should also set |
In the following code
err
is never notnull
:Maybe this is intended but then at least add the option for open flags so I can at least put
wx
and have iterr.code = "EEXIST"
Thanks,
Ryan
The text was updated successfully, but these errors were encountered: