From 10733575691c4cb119b11a26d666ad4e32fc7ec9 Mon Sep 17 00:00:00 2001 From: pizzaboxer Date: Sun, 30 Jul 2023 23:35:43 +0100 Subject: [PATCH] Add extra read-only checks --- Bloxstrap/InstallChecker.cs | 2 ++ Bloxstrap/UI/ViewModels/Menu/ModsViewModel.cs | 1 + 2 files changed, 3 insertions(+) diff --git a/Bloxstrap/InstallChecker.cs b/Bloxstrap/InstallChecker.cs index 9d8499a..285d61d 100644 --- a/Bloxstrap/InstallChecker.cs +++ b/Bloxstrap/InstallChecker.cs @@ -164,6 +164,8 @@ namespace Bloxstrap if (result != MessageBoxResult.Yes) return; + Filesystem.AssertReadOnly(Paths.Application); + // yes, this is EXTREMELY hacky, but the updater process that launched the // new version may still be open and so we have to wait for it to close int attempts = 0; diff --git a/Bloxstrap/UI/ViewModels/Menu/ModsViewModel.cs b/Bloxstrap/UI/ViewModels/Menu/ModsViewModel.cs index 261e09c..1db5533 100644 --- a/Bloxstrap/UI/ViewModels/Menu/ModsViewModel.cs +++ b/Bloxstrap/UI/ViewModels/Menu/ModsViewModel.cs @@ -40,6 +40,7 @@ namespace Bloxstrap.UI.ViewModels.Menu { Directory.CreateDirectory(Path.GetDirectoryName(Paths.CustomFont)!); File.Copy(dialog.FileName, Paths.CustomFont); + Filesystem.AssertReadOnly(Paths.CustomFont); } }