You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code here is incorrect since it is listening to the source stream "end" event which may trigger much sooner than the target stream has actually completed the writing to disk:
Instead you must listen to the "finish" event on the downloadStream, to make sure the file is completely stored and closed in disk. You may have not noticed this problem since as long as the process is still alive the file will eventually complete, but if the process closes before, you end with a truncated file. Use case: "electron-simple-updater" will close after downloading the latest version of an app and most likely end with a truncated file that will end with the end-user having a broken electron app.
The text was updated successfully, but these errors were encountered:
The code here is incorrect since it is listening to the source stream "end" event which may trigger much sooner than the target stream has actually completed the writing to disk:
node-httpreq/lib/httpreq.js
Line 352 in c2dbc95
Instead you must listen to the "finish" event on the downloadStream, to make sure the file is completely stored and closed in disk. You may have not noticed this problem since as long as the process is still alive the file will eventually complete, but if the process closes before, you end with a truncated file. Use case: "electron-simple-updater" will close after downloading the latest version of an app and most likely end with a truncated file that will end with the end-user having a broken electron app.
The text was updated successfully, but these errors were encountered: