npm / fstream

Advanced FS Streaming for Node
ISC License
208 stars 43 forks source link

[BUG] Fstream calls stat on written file *after* emitting close event, crashing when a consumer deletes file in on(close) #70

Open tkafka opened 3 years ago

tkafka commented 3 years ago

What / Why

See https://github.com/tomayac/local-reverse-geocoder/issues/39.

Fstream calls stat on written files (for reasons I don't understand) after emitting close event, and if a consumer uses and deletes the written file in close handler, stat causes crash.

I don't think fstream should touch the written file in any way after emitting close event.