Linux: Prevent crash when starting if "update-mime-database"/"update-desktop-database" are not available
This commit is contained in:
parent
12a1bbcaa9
commit
b8422ca956
1 changed files with 6 additions and 2 deletions
|
@ -87,8 +87,12 @@ namespace Mesen.GUI.Config
|
|||
CreateShortcutFile(desktopFile, mimeTypes);
|
||||
|
||||
//Update databases
|
||||
System.Diagnostics.Process.Start("update-mime-database", mimeFolder).WaitForExit();
|
||||
System.Diagnostics.Process.Start("update-desktop-database", desktopFolder);
|
||||
try {
|
||||
System.Diagnostics.Process.Start("update-mime-database", mimeFolder).WaitForExit();
|
||||
System.Diagnostics.Process.Start("update-desktop-database", desktopFolder);
|
||||
} catch {
|
||||
InteropEmu.WriteLogEntry("An error occurred while updating file associations");
|
||||
}
|
||||
}
|
||||
|
||||
static public void CreateShortcutFile(string filename, List<string> mimeTypes = null)
|
||||
|
|
Loading…
Add table
Reference in a new issue