Skip to content

Fix the crash after adding the Windows 11 menu entry, and the donut on a drag without files - #20

Merged
KnifeLemon merged 2 commits into
mainfrom
fix/explorer-menu-crash
Oct 1, 2026
Merged

KnifeLemon merged 2 commits into
mainfrom
fix/explorer-menu-crash

Conversation

@KnifeLemon

Copy link
Copy Markdown
Owner

What

Two bugs reported on 1.1.0:

  • Filee closed after adding the Windows 11 menu entry, and Settings → General no longer opened.
    GetPackagePathByFullName2 is not exported by kernel32.dll (only by kernelbase.dll), so reading where the
    registered package points threw EntryPointNotFoundException once the package existed — first inside the add
    command (an unhandled exception on that path ends the app), then every time the General page read the state.
    • The function is now imported from its API set api-ms-win-appmodel-runtime-l1-1-3.dll.
    • Reading the package state can no longer throw (an unknown external location just isn't compared), and the
      General page reports a failed add/remove instead of crashing.
    • New test: every LibraryImport in NativeMethods must exist in the DLL it names (it fails with the old import).
  • The donut opened for a modifier + drag that carried no files (e.g. selecting text). The window still opens
    at once so Explorer can drop onto it, but it stays invisible until files actually enter it.

Tests

dotnet test passes, including the new ExplorerMenuTests and Donut_toolbar_waits_for_files_in_drag_mode.

🤖 Generated with Claude Code

KnifeLemon and others added 2 commits October 1, 2026 23:50
GetPackagePathByFullName2 was imported from kernel32.dll, which doesn't
export it. The call only happens once the package is registered, so adding
the entry crashed Filee right after Windows accepted it, and the General
page threw on every later visit. It is now imported from its API set, the
package state and menu commands never take the app down, and a test checks
that every native import exists in the DLL it names.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The gesture is detected before anyone knows what is dragged, so a modifier +
drag of text or a rubber-band selection opened an empty ring. The window now
waits invisibly at the cursor and the donut appears only when files enter;
otherwise it closes quietly when the button is released.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@KnifeLemon KnifeLemon added the bug Something isn't working label Oct 1, 2026
@KnifeLemon
KnifeLemon merged commit 4318261 into main Oct 1, 2026
1 check passed
@KnifeLemon
KnifeLemon deleted the fix/explorer-menu-crash branch October 1, 2026 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant