Handle legitimate exception for "expected" failures

This commit is contained in:
Kamil Trzciński 2022-12-18 09:29:25 +01:00
parent ec0a84283b
commit 8cc45ed6b4
4 changed files with 24 additions and 2 deletions

View file

@ -340,6 +340,12 @@ namespace SteamController.Helpers
File.Copy(configPath + ".orig", configPath, true);
return true;
}
catch (FileNotFoundException e)
{
// File was not found (which is valid as it might be before first start of the application)
Log.DebugException("STEAM", e);
return false;
}
catch (DirectoryNotFoundException)
{
// Steam was installed, but got removed