mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-12 13:00:32 +00:00
Put more updater code inside the try { } catch(Exception)
* A crash was uploaded where File.Copy() failed due to permissions.
This commit is contained in:
@@ -167,16 +167,16 @@ namespace renderdocui.Windows.Dialogs
|
||||
{
|
||||
progressText.Text = "Installing";
|
||||
|
||||
File.Copy(Path.Combine(srcpath, "renderdoc.dll"), Path.Combine(dstpath, "renderdoc.dll"), true);
|
||||
File.Copy(Path.Combine(srcpath, "renderdoccmd.exe"), Path.Combine(dstpath, "renderdoccmd.exe"), true);
|
||||
|
||||
var process = new Process();
|
||||
process.StartInfo = new ProcessStartInfo(Path.Combine(dstpath, "renderdoccmd.exe"), "upgrade --path \"" + srcpath.Replace('\\', '/') + "/\"");
|
||||
process.StartInfo.WorkingDirectory = dstpath;
|
||||
process.StartInfo.Verb = "runas"; // need to run as admin to have write permissions
|
||||
|
||||
try
|
||||
{
|
||||
File.Copy(Path.Combine(srcpath, "renderdoc.dll"), Path.Combine(dstpath, "renderdoc.dll"), true);
|
||||
File.Copy(Path.Combine(srcpath, "renderdoccmd.exe"), Path.Combine(dstpath, "renderdoccmd.exe"), true);
|
||||
|
||||
var process = new Process();
|
||||
process.StartInfo = new ProcessStartInfo(Path.Combine(dstpath, "renderdoccmd.exe"), "upgrade --path \"" + srcpath.Replace('\\', '/') + "/\"");
|
||||
process.StartInfo.WorkingDirectory = dstpath;
|
||||
process.StartInfo.Verb = "runas"; // need to run as admin to have write permissions
|
||||
|
||||
process.Start();
|
||||
Environment.Exit(0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user