mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2025-01-11 15:59:08 +01:00
Wrapped filesystem actions within try/catch to avoid unexpected launch crashes
This commit is contained in:
parent
8c12fe742c
commit
0b67fd0858
@ -346,9 +346,18 @@ namespace DS4Windows.Forms
|
|||||||
|
|
||||||
if (onlylnkpath != Process.GetCurrentProcess().MainModule.FileName)
|
if (onlylnkpath != Process.GetCurrentProcess().MainModule.FileName)
|
||||||
{
|
{
|
||||||
File.Delete(Environment.GetFolderPath(Environment.SpecialFolder.Startup) + "\\DS4Windows.lnk");
|
try
|
||||||
appShortcutToStartup();
|
{
|
||||||
changeStartupRoutine();
|
File.Delete(Environment.GetFolderPath(Environment.SpecialFolder.Startup) + "\\DS4Windows.lnk");
|
||||||
|
appShortcutToStartup();
|
||||||
|
changeStartupRoutine();
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
MessageBox.Show("No access to Autorun/DS4Windows.lnk\nPlease check file permissions", "DS4Windows");
|
||||||
|
StartWindowsCheckBox.Checked = false;
|
||||||
|
runStartupPanel.Visible = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user