diff options
author | Alexander Larsson <alexl@redhat.com> | 2009-03-03 19:03:20 +0000 |
---|---|---|
committer | Alexander Larsson <alexl@src.gnome.org> | 2009-03-03 19:03:20 +0000 |
commit | 5acd615cfe5272dd11ebce3ec34321fec0124071 (patch) | |
tree | 083944d001402b21fb06597af938e95e81f12261 /programs | |
parent | 5838b96c55de01abb76a9e3b0c52858d3462fa10 (diff) | |
download | gvfs-5acd615cfe5272dd11ebce3ec34321fec0124071.tar.gz |
Bug 561172 – gnome-open fails on local URIs with anchors
2009-03-03 Alexander Larsson <alexl@redhat.com>
Bug 561172 – gnome-open fails on local URIs with anchors
* programs/gvfs-open.c:
Don't pass file:// uris with anchor as filename
svn path=/trunk/; revision=2283
Diffstat (limited to 'programs')
-rw-r--r-- | programs/gvfs-open.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/programs/gvfs-open.c b/programs/gvfs-open.c index 26efa5f0..1f734b8c 100644 --- a/programs/gvfs-open.c +++ b/programs/gvfs-open.c @@ -38,6 +38,15 @@ static GOptionEntry entries[] = { {NULL} }; +static gboolean +is_file_uri_with_anchor (char *str) +{ + if (g_ascii_strncasecmp (str, "file:", 5) == 0 && + strchr (str, '#') != NULL) + return TRUE; + return FALSE; +} + static void open (GFile *file, char *arg_string) { @@ -59,7 +68,7 @@ open (GFile *file, char *arg_string) return; } - if (g_file_is_native (file)) + if (g_file_is_native (file) && !is_file_uri_with_anchor (arg_string)) { /* For normal files, pass in the canonicalized GFile as path */ l.data = file; |