Linux: Prevent crash when starting if "update-mime-database"/"update-desktop-database" are not available

This commit is contained in:
Sour 2019-01-26 13:28:51 -05:00
parent 12a1bbcaa9
commit b8422ca956

View file

@ -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)