gvfs r2283 - in trunk: . programs



Author: alexl
Date: Tue Mar  3 19:03:20 2009
New Revision: 2283
URL: http://svn.gnome.org/viewvc/gvfs?rev=2283&view=rev

Log:
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



Modified:
   trunk/ChangeLog
   trunk/programs/gvfs-open.c

Modified: trunk/programs/gvfs-open.c
==============================================================================
--- trunk/programs/gvfs-open.c	(original)
+++ trunk/programs/gvfs-open.c	Tue Mar  3 19:03:20 2009
@@ -38,6 +38,15 @@
   {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 @@
       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;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]