Commit 2db387a
committed
Use Stream.destroy() to ensure stream is closed before unlinking upon failure, this prevents a memory leak and on Windows a failure to delete the file.
Even though this is not an officially documented function until Node v8 it works all the way down to v0.12.1 parent fd85869 commit 2db387a
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
400 | 400 | | |
401 | 401 | | |
402 | 402 | | |
403 | | - | |
404 | | - | |
| 403 | + | |
405 | 404 | | |
| 405 | + | |
406 | 406 | | |
407 | 407 | | |
408 | 408 | | |
| |||
0 commit comments