gvfs r1151 - in trunk: . common



Author: alexl
Date: Fri Jan 18 11:24:58 2008
New Revision: 1151
URL: http://svn.gnome.org/viewvc/gvfs?rev=1151&view=rev

Log:
2008-01-18  Alexander Larsson  <alexl redhat com>

        * common/gmountspec.c:
        (g_mount_spec_new_from_data):
	Ensure that mount_prefix is never NULL. It
	should be "/" in that case.



Modified:
   trunk/ChangeLog
   trunk/common/gmountspec.c

Modified: trunk/common/gmountspec.c
==============================================================================
--- trunk/common/gmountspec.c	(original)
+++ trunk/common/gmountspec.c	Fri Jan 18 11:24:58 2008
@@ -58,6 +58,7 @@
   return spec;
 }
 
+/* Takes ownership of passed in data */
 GMountSpec *
 g_mount_spec_new_from_data (GArray *items,
 			    char *mount_prefix)
@@ -67,7 +68,10 @@
   spec = g_new0 (GMountSpec, 1);
   spec->ref_count = 1;
   spec->items = items;
-  spec->mount_prefix = mount_prefix;
+  if (mount_prefix == NULL)
+    spec->mount_prefix = g_strdup ("/");
+  else
+    spec->mount_prefix = mount_prefix;
 
   g_array_sort (spec->items, item_compare);
   



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