only delete file when downloaded from http
This commit is contained in:
@@ -200,7 +200,7 @@ public class UpdateClient(string updateUrl, AppVersion currentVersion, AppChanne
|
||||
File.Delete(packagePath);
|
||||
Directory.Delete(dataPath, true);
|
||||
}
|
||||
else if (package.PackageType == PackageType.File)
|
||||
else if (package.PackageType == PackageType.File && package.AddressType == PackageAddressType.Http)
|
||||
File.Delete(dataPath);
|
||||
RaiseStatusChanged(UpdateStatus.Cleanup, UpdateStatusEvent.PostEvent);
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ public static class Utils
|
||||
oldFile = destFileName + ".old";
|
||||
File.Move(destFileName, oldFile, true);
|
||||
triesLeft++;
|
||||
Thread.Sleep(1000);
|
||||
Thread.Sleep(100);
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
@@ -55,7 +55,6 @@ public static class Utils
|
||||
try
|
||||
{
|
||||
File.Delete(oldFile);
|
||||
Thread.Sleep(1000);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user