NSISdl deletes file(s) when offline: Difference between revisions

From NSIS Wiki
Jump to navigationJump to search
m (Wikipedia python library)
 
m (Updated author and download links, and changed format of some pages.)
Line 11: Line 11:
: You should download the file to a temporary directory (such as $PLUGINSDIR or $TEMP), and as soon as you've made sure that you've got the right file, and there were no errors, then you should copy it to its destination.
: You should download the file to a temporary directory (such as $PLUGINSDIR or $TEMP), and as soon as you've made sure that you've got the right file, and there were no errors, then you should copy it to its destination.


Page author: virtlink
Page author: [[User:virtlink|virtlink]]

Revision as of 12:36, 23 April 2005

Issue
When the NSISdl plugin must download a file, and there is no internet connection, the target file gets deleted if it already exists.
Cause
NSISdl deletes the target file if an error occurs, to prevent leaving any corrupted files.
Solution
Use the Dialer plugin to check the internet connection.
Recommendation
You should download the file to a temporary directory (such as $PLUGINSDIR or $TEMP), and as soon as you've made sure that you've got the right file, and there were no errors, then you should copy it to its destination.

Page author: virtlink