Skip to content

Commit

Permalink
Fix not-empty logs directory & launcher directory requirement
Browse files Browse the repository at this point in the history
  • Loading branch information
paulov-t committed May 7, 2024
1 parent bd6f404 commit e09bc09
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions SIT.Manager/Services/Install/InstallerService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit e09bc09

Please sign in to comment.