This commit is contained in:
Natsumi
2024-12-16 20:59:50 +13:00
parent 28609102a4
commit 0734e35a2b
3 changed files with 9 additions and 8 deletions

View File

@@ -119,8 +119,7 @@ namespace VRCX
var dirs = Directory.GetDirectories(topDir, versionSearchPattern);
if (dirs.Length > 0)
return dirs.OrderByDescending(dir => ReverseHexToDecimal(Path.GetFileName(dir)).Item2).First();
return Path.Combine(topDir, versionLocation);
}

View File

@@ -134,20 +134,22 @@ namespace VRCX
}
}
#endregion
#region Handle Database Error
catch (SQLiteException e)
{
logger.Fatal(e, "Unhandled SQLite Exception, closing");
logger.Fatal(e, "Unhandled SQLite Exception, closing.");
var messageBoxResult = MessageBox.Show(
"An error which is related to your Database occured, this might indicate a broken database. " +
"You can go to https://github.com/vrcx-team/VRCX/wiki#how-to-repair-vrcx-database to find potential steps for resolving the issue. " +
"If the issue remains please join the Discord (https://vrcx.app/discord) to get further assistance. " +
"Would you like to open the Database repair steps page?\n" +
"A fatal database error has occured.\n" +
"Please try to repair your database by following the steps in the provided repair guide, or alternatively rename your \"%AppData%\\VRCX\" folder to reset VRCX. " +
"If the issue still persists after following the repair guide please join the Discord (https://vrcx.app/discord) for further assistance. " +
"Would you like to open the webpage for database repair steps?\n" +
e, "Database error", MessageBoxButtons.YesNo, MessageBoxIcon.Error);
if (messageBoxResult == DialogResult.Yes)
{
AppApi.Instance.OpenLink("https://github.com/vrcx-team/VRCX/wiki#how-to-repair-vrcx-database");
}
}
#endregion
catch (Exception e)
{
var cpuError = WinApi.GetCpuErrorMessage();