Skip to content

Conversation

@alex-1q84
Copy link

…en -a in commandline

Changes:

  • Add decode_file_url() function using percent_encoding crate
  • Handle file:/// and file://localhost/ URL formats used by macOS
  • Add percent-encoding = "2.3" to Cargo.toml (explicit dependency)
  • Update Cargo.lock with percent-encoding dependency
  • Add error logging for file path validation failures

This patch ensures proper decoding of URL-encoded file paths including UTF-8 multi-byte characters (e.g., Chinese filenames) when files are opened via open -a markdown-viewer FILE.md command.

The percent_encoding crate is already included as a transitive dependency through Tauri, so this doesn't add a new dependency to the final binary.

…en -a in commandline

Changes:
- Add decode_file_url() function using percent_encoding crate
- Handle file:/// and file://localhost/ URL formats used by macOS
- Add percent-encoding = "2.3" to Cargo.toml (explicit dependency)
- Update Cargo.lock with percent-encoding dependency
- Add error logging for file path validation failures

This patch ensures proper decoding of URL-encoded file paths including
UTF-8 multi-byte characters (e.g., Chinese filenames) when files are
opened via `open -a markdown-viewer FILE.md` command.

The percent_encoding crate is already included as a transitive dependency
through Tauri, so this doesn't add a new dependency to the final binary.
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.

1 participant