diff --git a/ArchiSteamFarm/Program.cs b/ArchiSteamFarm/Program.cs index 02bcfca19..4d17082df 100644 --- a/ArchiSteamFarm/Program.cs +++ b/ArchiSteamFarm/Program.cs @@ -171,8 +171,12 @@ namespace ArchiSteamFarm { // If debugging is on, we prepare debug directory prior to running if (GlobalConfig.Debug) { if (Directory.Exists(SharedInfo.DebugDirectory)) { - Directory.Delete(SharedInfo.DebugDirectory, true); - await Task.Delay(1000).ConfigureAwait(false); // Dirty workaround giving Windows some time to sync + try { + Directory.Delete(SharedInfo.DebugDirectory, true); + await Task.Delay(1000).ConfigureAwait(false); // Dirty workaround giving Windows some time to sync + } catch (IOException e) { + ArchiLogger.LogGenericException(e); + } } Directory.CreateDirectory(SharedInfo.DebugDirectory);