-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Delete file after createWriteStream raises no error when stream.write('whatever') #18274
Comments
Hi! A few things:
And even if it does run while the stream is open, then no, at least on non-Windows systems (don’t know about others) this is the expected behavior. There’s a reason the operation is called |
@vladblindu I’m closing this in the hope that the question is answered for you. If not, please feel free to comment again (here or, if you have more questions, on the https://github.com/nodejs/help repository) |
Thank you again for your time and your explanation. I’ll modify my code accordingly. Sorry for the ES6 syntax. I am quite unexperienced with this kind of issue reporting.
Also please excuse me I replied so late.
Thanks again
I also apologise for the late reply
… On 24 Jan 2018, at 21:03, Anna Henningsen ***@***.***> wrote:
Closed #18274 <#18274>.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#18274 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AH1F_mjEUSZl9t7qWt6ivxmye04qgDQiks5tN36EgaJpZM4RllYx>.
|
I can confirm this is still happening on Windows, when using https://github.com/sindresorhus/got Whenever I start downloading and streaming to the opened file, and hard delete the file, no error is thrown. |
This is happening to me as well. To reproduce:
I'm running on Linux Ubuntu 20.04 and getting this output:
Even though I would expect to see an exception from the |
@amitzur if this is not reopened, would you consider opening another issue with your example? |
@rejetto makes sense. I will, thanks! |
I'm on a mac, Node v8.6.0.
Briefly, if I do this in mocha :
the test passes.
I don't thimk this has anything to do with importing fs-extra. It's just a wrapper for fs.
Is this a normal behaviour? Shouldn't there be some way to prevent this kind of error?
Thank you for your time.
The text was updated successfully, but these errors were encountered: