Skip to content

Commit

Permalink
Fix error caused by read-only mod files
Browse files Browse the repository at this point in the history
  • Loading branch information
pizzaboxer committed Sep 30, 2022
1 parent c71c2b1 commit e3afc92
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions Bloxstrap/Bootstrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,7 @@ private void ApplyModifications()
Directory.CreateDirectory(directory);

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
Expand Down
4 changes: 4 additions & 0 deletions Bloxstrap/Dialogs/BootstrapperStyles/BootstrapperStyleForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ public async void RunBootstrapper()
if (Bootstrapper is null)
return;

#if DEBUG
await Bootstrapper.Run();
#else
try
{
await Bootstrapper.Run();
Expand All @@ -92,6 +95,7 @@ public async void RunBootstrapper()
string message = ex.ToString();
ShowError(message);
}
#endif
}

public virtual void ShowSuccess(string message)
Expand Down

0 comments on commit e3afc92

Please sign in to comment.