Navigation Menu

Skip to content

Commit

Permalink
Fixed ocasional fault on diff installer download
Browse files Browse the repository at this point in the history
In certain cases when the download fails the file name is null and the
delete file faults. This change handles that case gracefully.
  • Loading branch information
Goran Devic committed Jan 8, 2013
1 parent 3e85dd8 commit 580203d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion FormDownload.cs
Expand Up @@ -80,7 +80,8 @@ void WorkerRunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
// Remove temporary file if we did not complete the download
if(!isCompleted)
{
File.Delete(TargetFile);
if (!String.IsNullOrEmpty(TargetFile))
File.Delete(TargetFile);
DialogResult = DialogResult.Cancel;
}
else
Expand Down

0 comments on commit 580203d

Please sign in to comment.