Check all files are writeable before applying update. Closes #264

This commit is contained in:
baldurk
2016-05-19 22:01:56 +02:00
parent 69705d9e99
commit 84528ce316
2 changed files with 70 additions and 3 deletions
+11 -1
View File
@@ -156,8 +156,10 @@ namespace renderdocui.Code
var core = new Core(filename, remoteHost, remoteIdent, temp, cfg);
foreach (var a in args)
for(int i=0; i < args.Length; i++)
{
var a = args[i];
if (a.ToUpperInvariant() == "--UPDATEDONE")
{
cfg.CheckUpdate_UpdateAvailable = false;
@@ -178,6 +180,14 @@ namespace renderdocui.Code
Helpers.UpdateInstalledVersionNumber();
}
if (a.ToUpperInvariant() == "--UPDATEFAILED")
{
if(i < args.Length-1)
MessageBox.Show(String.Format("Error applying update: {0}", args[i+1]), "Error updating", MessageBoxButtons.OK, MessageBoxIcon.Error);
else
MessageBox.Show("Unknown error applying update", "Error updating", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
try