Skip to content

fix(desktop): open local file paths with file:// scheme - #1

Merged
jecruz merged 1 commit into
devfrom
fix/desktop-open-local-file-paths
Mar 25, 2026
Merged

jecruz merged 1 commit into
devfrom
fix/desktop-open-local-file-paths

Conversation

@jecruz

@jecruz jecruz commented Mar 25, 2026

Copy link
Copy Markdown
Owner

Summary

  • When cmd+clicking on a local file path (e.g., README.md, src/app.ts), the open-link handler now converts bare paths to file:// URLs with resolved absolute paths before calling shell.openExternal().

Root Cause

In packages/desktop-electron/src/main/ipc.ts, the open-link handler passed bare file paths directly to shell.openExternal(), which treated them as HTTP URLs and failed.

Testing

  • Verified that clicking README.md opens in the default markdown viewer (mkdn)
  • Verified that file://, https://, and other schemes still work correctly

Fixes anomalyco#19144

When cmd+clicking on a local file path (README.md, src/app.ts, etc.),
the open-link handler now converts bare paths to file:// URLs with
resolved absolute paths before calling shell.openExternal().

Fixes anomalyco#19144
@jecruz
jecruz merged commit 06a087e into dev Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cmd+click on local file paths opens wrong URL (http instead of file://)

1 participant