After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 623508 - poor handling of file:/// URIs
poor handling of file:/// URIs
Status: RESOLVED FIXED
Product: notification-daemon
Classification: Other
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: William Jon McCann
Depends on:
Blocks:
 
 
Reported: 2010-07-04 07:43 UTC by Jonathan Matthew
Modified: 2010-10-09 07:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (1.35 KB, patch)
2010-07-04 07:45 UTC, Jonathan Matthew
none Details | Review
updated (1.38 KB, patch)
2010-10-09 04:27 UTC, Jonathan Matthew
none Details | Review
use g_file_is_native (2.21 KB, patch)
2010-10-09 06:28 UTC, Jonathan Matthew
committed Details | Review

Description Jonathan Matthew 2010-07-04 07:43:13 UTC
_notification_daemon_pixbuf_from_path converts file:// URIs into file paths by just skipping the URI scheme, which is a fairly terrible way of doing it.  Instead it should use g_file_new_for_commandline_arg and g_file_get_path.
Comment 1 Jonathan Matthew 2010-07-04 07:45:55 UTC
Created attachment 165210 [details] [review]
patch
Comment 2 Jonathan Matthew 2010-10-09 04:27:02 UTC
Created attachment 171986 [details] [review]
updated
Comment 3 William Jon McCann 2010-10-09 05:36:16 UTC
Might even be better to skip:
        if (!strncmp (path, "file://", 7) || *path == '/') {
too and always do g_file_new_for_commandline_arg with some g_file_is_native action?
Comment 4 Jonathan Matthew 2010-10-09 06:28:24 UTC
Created attachment 171989 [details] [review]
use g_file_is_native

This seems a bit more straightforward.
Comment 5 William Jon McCann 2010-10-09 07:03:49 UTC
Comment on attachment 171989 [details] [review]
use g_file_is_native

Looks good.  Thanks!
Comment 6 Jonathan Matthew 2010-10-09 07:16:18 UTC
pushed as commit c144b45.