mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-11-30 04:54:20 +01:00
Skip updater execution if new version could not be downloaded
Related to issue #638
This commit is contained in:
parent
9bf4499007
commit
592a0245b7
@ -792,14 +792,8 @@ Properties.Resources.DS4Update, MessageBoxButtons.YesNo, MessageBoxIcon.Question
|
||||
Uri url2 = new Uri($"https://github.com/Ryochan7/DS4Updater/releases/download/v{UPDATER_VERSION}/{updaterExe}");
|
||||
WebClient wc2 = new WebClient();
|
||||
if (appdatapath == exepath)
|
||||
wc2.DownloadFile(url2, exepath + "\\DS4Updater.exe");
|
||||
else
|
||||
{
|
||||
this.BeginInvoke((System.Action)(() => MessageBox.Show(Properties.Resources.PleaseDownloadUpdater)));
|
||||
Process.Start($"https://github.com/Ryochan7/DS4Updater/releases/download/v{UPDATER_VERSION}/{updaterExe}");
|
||||
}
|
||||
}
|
||||
|
||||
wc2.DownloadFile(url2, exepath + "\\DS4Updater.exe");
|
||||
Process p = new Process();
|
||||
p.StartInfo.FileName = exepath + "\\DS4Updater.exe";
|
||||
p.StartInfo.Arguments = "-autolaunch";
|
||||
@ -809,6 +803,13 @@ Properties.Resources.DS4Update, MessageBoxButtons.YesNo, MessageBoxIcon.Question
|
||||
try { p.Start(); Close(); }
|
||||
catch { }
|
||||
}
|
||||
else
|
||||
{
|
||||
this.BeginInvoke((System.Action)(() => MessageBox.Show(Properties.Resources.PleaseDownloadUpdater)));
|
||||
Process.Start($"https://github.com/Ryochan7/DS4Updater/releases/download/v{UPDATER_VERSION}/{updaterExe}");
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
File.Delete(appdatapath + "\\version.txt");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user