From 680f6dfda3bd0186accc5e688a4961139c580189 Mon Sep 17 00:00:00 2001 From: pizzaboxer Date: Thu, 31 Aug 2023 10:07:50 +0100 Subject: [PATCH] I HATE WINDOWS --- Bloxstrap/Bootstrapper.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Bloxstrap/Bootstrapper.cs b/Bloxstrap/Bootstrapper.cs index d68c50c..c0174b1 100644 --- a/Bloxstrap/Bootstrapper.cs +++ b/Bloxstrap/Bootstrapper.cs @@ -498,7 +498,10 @@ namespace Bloxstrap // in case the user is reinstalling if (File.Exists(Paths.Application) && App.IsFirstRun) + { + Filesystem.AssertReadOnly(Paths.Application); File.Delete(Paths.Application); + } // check to make sure bootstrapper is in the install folder if (!File.Exists(Paths.Application) && Environment.ProcessPath is not null) @@ -1182,6 +1185,7 @@ namespace Bloxstrap Directory.CreateDirectory(Path.GetDirectoryName(fileVersionFolder)!); + Filesystem.AssertReadOnly(fileVersionFolder); File.Copy(fileModFolder, fileVersionFolder, true); Filesystem.AssertReadOnly(fileVersionFolder);