Skip to content

Commit

Permalink
Add information to log if folder can't be removed
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkeye116477 committed Nov 20, 2024
1 parent 3f834de commit a2417bd
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/LegendaryGameController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,16 @@ public static void LaunchUninstaller(List<Game> games)
File.Delete(gameSettingsFile);
}
}
if (Directory.Exists(game.InstallDirectory))
try
{
if (Directory.Exists(game.InstallDirectory))
{
Directory.Delete(game.InstallDirectory, true);
}
}
catch (Exception ex)
{
Directory.Delete(game.InstallDirectory, true);
logger.Debug(ex.Message);
}
game.IsInstalled = false;
game.InstallDirectory = "";
Expand Down

0 comments on commit a2417bd

Please sign in to comment.