Skip to content

Guard the menu and hotkey delete paths - #813

Merged
SimonCropp merged 1 commit into
mainfrom
fix-tray-unguarded-delete
Aug 22, 2026
Merged

Guard the menu and hotkey delete paths#813
SimonCropp merged 1 commit into
mainfrom
fix-tray-unguarded-delete

Conversation

@SimonCropp

Copy link
Copy Markdown
Member

The wire path deletes through AcceptTracked, which catches, re-tracks so the
delete can be retried, and reports why it failed. The menu and hot key paths
called File.Delete straight.

So a read-only or open verified file threw out of a click handler, onto the UI
thread, where nothing hooks Application.ThreadException. The entry had already
been untracked by then, so the pending delete was lost with the exception. In
AcceptAll it was worse: the first bad delete skipped the remaining deletes,
every pending move and all the snapshots, so "Accept all" quietly stopped at the
first file it could not remove.

All three now go through AcceptTracked, and AcceptAllDeletes drops its Clear -
a failed delete re-tracks itself, and clearing afterwards would throw that away
again. Failures are logged rather than shown, since a read-only file is not
worth an exception dialog.

The wire path deletes through AcceptTracked, which catches, re-tracks so the
delete can be retried, and reports why it failed. The menu and hot key paths
called File.Delete straight.

So a read-only or open verified file threw out of a click handler, onto the UI
thread, where nothing hooks Application.ThreadException. The entry had already
been untracked by then, so the pending delete was lost with the exception. In
AcceptAll it was worse: the first bad delete skipped the remaining deletes,
every pending move and all the snapshots, so "Accept all" quietly stopped at the
first file it could not remove.

All three now go through AcceptTracked, and AcceptAllDeletes drops its Clear -
a failed delete re-tracks itself, and clearing afterwards would throw that away
again. Failures are logged rather than shown, since a read-only file is not
worth an exception dialog.
@SimonCropp SimonCropp added this to the 20.0.0 milestone Aug 22, 2026
@SimonCropp
SimonCropp merged commit 4cc2766 into main Aug 22, 2026
10 checks passed
@SimonCropp
SimonCropp deleted the fix-tray-unguarded-delete branch August 22, 2026 07:09
This was referenced Aug 26, 2026
This was referenced Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant