Skip to content

Commit

Permalink
Better error message for access denied during backup
Browse files Browse the repository at this point in the history
  • Loading branch information
Klocman committed Aug 21, 2024
1 parent 25ce789 commit 301de20
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions source/BulkCrapUninstaller/Forms/Windows/JunkRemoveWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@ private void CreateBackup(string backupPath)
}
catch (Exception ex)
{
// https:/dotnet/runtime/issues/24783
if (ex is FileNotFoundException)
ex = new UnauthorizedAccessException("You do not have access to this path, choose a different path. If you use controlled folders, try turning them off or adding BCU to exclusions.", ex);

PremadeDialogs.GenericError(ex);
throw new OperationCanceledException();
}
Expand Down

0 comments on commit 301de20

Please sign in to comment.