Skip to content

Fix "Operation not supported" error when dragging and dropping files on macOS (#2124)#2170

Open
robertoffmoura wants to merge 1 commit into
PintaProject:masterfrom
robertoffmoura:handledrop-fix
Open

Fix "Operation not supported" error when dragging and dropping files on macOS (#2124)#2170
robertoffmoura wants to merge 1 commit into
PintaProject:masterfrom
robertoffmoura:handledrop-fix

Conversation

@robertoffmoura
Copy link
Copy Markdown

Fixes a bug where dragging and dropping a local file from Finder into Pinta on macOS causes a GLib.GException: Operation not supported crash when the image importer tries to read the file.

When a file is dragged from the macOS pasteboard, the GTK4 backend provides a malformed URI where the colon in the scheme is URL-encoded (e.g., file%3A///... instead of file:///...), resulting in the "Operation not supported" exception.

  • Added logic to inspect the dropped file's ParseName. If it starts with the malformed macOS file%3A/// string, the method uses Uri.UnescapeDataString to decode it back into a valid file:/// URI.

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