glib r7119 - branches/glib-2-16/gio



Author: matthiasc
Date: Tue Jul  1 02:39:26 2008
New Revision: 7119
URL: http://svn.gnome.org/viewvc/glib?rev=7119&view=rev

Log:
        Bug 528600 â g_dummy_file_get_parent("scheme://example.com/")

        * gdummyfile.c (g_dummy_file_get_parent): Return NULL if there
        is no parent.  (Owen Taylor, patch by Christian Neumair)



Modified:
   branches/glib-2-16/gio/ChangeLog
   branches/glib-2-16/gio/gdummyfile.c

Modified: branches/glib-2-16/gio/gdummyfile.c
==============================================================================
--- branches/glib-2-16/gio/gdummyfile.c	(original)
+++ branches/glib-2-16/gio/gdummyfile.c	Tue Jul  1 02:39:26 2008
@@ -172,7 +172,8 @@
   char *uri;
   GDecodedUri new_decoded_uri;
 
-  if (dummy->decoded_uri == NULL)
+  if (dummy->decoded_uri == NULL ||
+      g_strcmp0 (dummy->decoded_uri->path, "/") == 0)
     return NULL;
 
   dirname = g_path_get_dirname (dummy->decoded_uri->path);



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