Skip to content

macOS: Cannot open image by double-click when path contains special characters like []<> #336

Description

@nmsbnmsb1

Describe the bug
On macOS, double-clicking an image in Finder fails to open it in PicView when any folder in the file path contains special characters such as [, ], <, or >. The app either does not respond or opens without loading the image. Drag & drop into the PicView window works correctly.

To Reproduce

  1. Create a folder with special characters in its name, e.g. [123] Photos
  2. Place any image file inside it
  3. Set PicView as the default app for that image type
  4. Double-click the image in Finder
  5. PicView fails to open the image

Expected behavior
The image should open normally, identical to the behavior when dragging and dropping the file into PicView.

Screenshots
N/A

Additional context

  • Drag & drop works correctly, so the issue is specific to the double-click / file association code path
  • Confirmed affected characters: [ ] < >
  • Suspected cause: on macOS, files opened via Launch Services are passed to the app as a file:// URI. These characters are reserved or illegal in URI syntax (RFC 3986), so if the path is being parsed as a Uri object without proper escaping, it will fail. Drag & drop likely bypasses this URI parsing, which is why it works.

Version
PicView-4.2.0-macOS-arm64

  • This issue was not present in PicView-4.1.2-macOS-arm64.dmg

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions