Juul / tail-stream

Like `tail -f` but a stream. Like fs.createReadStream but keeps reading as the file grows.
Other
33 stars 13 forks source link

rename not ends the stream #2

Closed psi-4ward closed 10 years ago

psi-4ward commented 10 years ago

If fs.watch is available and truncate detection is enabled, then errors occur (and the stream is closed if endOnError is set).

Imho is this not true. Youre going on reading the renamed file so you would never detect any truncating. → no error emitting or stream ending.

Juul commented 10 years ago

The reason this happens is because truncate detection requires stat calls that, unlike watch, do not follow the file after a rename. Have you observed that this is not true? If so, I will look into it.

Juul commented 10 years ago

I have fixed this. See the updated FAQ in the readme for more info.