Fix error caused by read-only mod files

This commit is contained in:
pizzaboxer 2022-09-30 15:41:01 +01:00
parent c71c2b1f5f
commit e3afc92924
2 changed files with 5 additions and 0 deletions

View File

@ -510,6 +510,7 @@ namespace Bloxstrap
Directory.CreateDirectory(directory); Directory.CreateDirectory(directory);
File.Copy(fileModFolder, fileVersionFolder, true); File.Copy(fileModFolder, fileVersionFolder, true);
File.SetAttributes(fileVersionFolder, File.GetAttributes(fileModFolder) & ~FileAttributes.ReadOnly);
} }
// now check for files that have been deleted from the mod folder // now check for files that have been deleted from the mod folder

View File

@ -82,6 +82,9 @@ namespace Bloxstrap.Dialogs.BootstrapperStyles
if (Bootstrapper is null) if (Bootstrapper is null)
return; return;
#if DEBUG
await Bootstrapper.Run();
#else
try try
{ {
await Bootstrapper.Run(); await Bootstrapper.Run();
@ -92,6 +95,7 @@ namespace Bloxstrap.Dialogs.BootstrapperStyles
string message = ex.ToString(); string message = ex.ToString();
ShowError(message); ShowError(message);
} }
#endif
} }
public virtual void ShowSuccess(string message) public virtual void ShowSuccess(string message)