-
Notifications
You must be signed in to change notification settings - Fork 771
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
fs.copy
fails silently if source file is /dev/null
#193
Comments
Do you get the same problem with just |
It appears to fail, silently, without creating the file or calling the callback:
(Node 4.2.1, Fedora 22) |
Thanks. Verified. Just hangs on OS X 10.11 / Node 4.2.1. Surely this is the offending line: https://github.com/jprichardson/node-fs-extra/blob/0.26.2/lib/copy/copy.js#L15 Ideas on a practical solution? I'd hate as something could be symlinked to /dev/null right? Surely others have experienced this... a cursory Google search didn't return much. Thanks for your help. |
Nope, this is the offending line: https://github.com/jprichardson/node-fs-extra/blob/0.26.2/lib/copy/copy.js#L24 Is there something about the |
No, it's not there, either - it's the |
I think the check in that function for
I've tried that (can branch and submit a pull request if you like). It makes the Node function behave the same way that |
I would love a pull request :) I have a test here: 631ed20 |
Updated test. Thanks again for your help, it's much appreciated! |
Using bluebird with
fs.copyAsync
, my program finished with no error despite a.catch(console.error)
when I tried to copy/dev/null
onto a file.The text was updated successfully, but these errors were encountered: