This project has moved. For the latest updates, please go here.
2
Vote

Directory and all downloaded files deleted on first error

description

If a file fails to download (404 for instance), its directory will be deleted - even if there are other files in there that have already been downloaded (as is normally the case).
 
The following change is what causes the problem: http://netmassdownloader.codeplex.com/SourceControl/changeset/changes/50493#DownloadLibrary%2fClasses%2fPdbParsing%2fPdbFileExtractor.cs
 
If you look at line 282, it will delete the directory if a download files - however that directory may have already existed before the file was attempted to be downloaded (line 264), so contains files which will now be erroneously deleted.
 
The fix is to delete the else clause of line 264 and wrap the check on line 282 in a check for createdDirectory being non-null.

comments