mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-21 13:15:57 +00:00
Check all files are writeable before applying update. Closes #264
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user