diff --git a/SIT.Manager/Services/Install/InstallerService.cs b/SIT.Manager/Services/Install/InstallerService.cs index 5d6a4d8c..f1ac008f 100644 --- a/SIT.Manager/Services/Install/InstallerService.cs +++ b/SIT.Manager/Services/Install/InstallerService.cs @@ -86,7 +86,7 @@ private void CleanUpEFTDirectory() string logsDirPath = Path.Combine(_configService.Config.SitEftInstallPath, "Logs"); if (Directory.Exists(logsDirPath)) { - Directory.Delete(logsDirPath); + Directory.Delete(logsDirPath, true); } } catch (Exception ex) @@ -657,7 +657,9 @@ public async Task InstallSit(GithubRelease selectedVersion, string targetInstall var coreFilesPath = Path.Combine(targetInstallDir, "SITLauncher", "CoreFiles"); // Recursively delete all downloaded files / folders - Directory.Delete(coreFilesPath, true); + if(Directory.Exists(coreFilesPath)) + Directory.Delete(coreFilesPath, true); + // Recreate directory for downloaded files / folders Directory.CreateDirectory(coreFilesPath);