Skip to content

Commit

Permalink
fix: reset UID cache when patch fails to install
Browse files Browse the repository at this point in the history
  • Loading branch information
goaaats committed Oct 3, 2023
1 parent dc6d76e commit 1122751
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/XIVLauncher/Updates.cs
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,16 @@ public async Task Run(bool downloadPrerelease, ChangelogWindow changelogWindow)

if (newRelease != null)
{
try
{
// Reset UID cache after updating
App.UniqueIdCache.Reset();
}
catch
{
// ignored
}

if (changelogWindow == null)
{
Log.Error("changelogWindow was null");
Expand Down
10 changes: 10 additions & 0 deletions src/XIVLauncher/Windows/ViewModel/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1020,6 +1020,16 @@ private void PatcherOnFail(PatchManager.FailReason reason, string versionId)

private void InstallerOnFail()
{
try
{
// Reset UID cache, we need users to log in again
App.UniqueIdCache.Reset();
}
catch
{
// ignored
}

CustomMessageBox.Show(
Loc.Localize("PatchInstallerInstallFailed", "The patch installer ran into an error.\nPlease report this error.\n\nPlease try again or use the official launcher."),
"XIVLauncher Error", MessageBoxButton.OK, MessageBoxImage.Error);
Expand Down

0 comments on commit 1122751

Please sign in to comment.