We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 2567 - x11: Local dropped files are not URI-decoded
Summary: x11: Local dropped files are not URI-decoded
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: events (show other bugs)
Version: HG 2.1
Hardware: x86_64 Linux
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-02 09:42 UTC by Melker Narikka
Modified: 2014-06-16 01:31 UTC (History)
0 users

See Also:


Attachments
decode local file URIs (2.67 KB, patch)
2014-06-02 09:42 UTC, Melker Narikka
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Melker Narikka 2014-06-02 09:42:44 UTC
Created attachment 1667 [details]
decode local file URIs

Local files that are dropped onto a window under X11
are not going through a URI decoding step, resulting in the following
in my test application[1]:

Dropped file /home/meklu/Pictures/Screenshot%20from%202013-10-30%2014:04:50.png
Couldn't load /home/meklu/Pictures/Screenshot%20from%202013-10-30%2014:04:50.png

Expected result:

Dropped file /home/meklu/Pictures/Screenshot from 2013-10-30 14:04:50.png
Loaded /home/meklu/Pictures/Screenshot from 2013-10-30 14:04:50.png successfully

I've attached a patch that fixes the issue by doing URI decoding in-place on
the file string buffer.

[1]: http://meklu.org/code/glimgblur.tar.xz
Comment 1 Sam Lantinga 2014-06-16 01:31:54 UTC
Fixed, thanks!
https://hg.libsdl.org/SDL/rev/cd1113741ade