gtk+ r19962 - in trunk: . gtk



Author: federico
Date: Wed Apr  2 17:48:15 2008
New Revision: 19962
URL: http://svn.gnome.org/viewvc/gtk+?rev=19962&view=rev

Log:
bgo492134 - fix tilde expansion in GtkFileSystemUnix

Signed-off-by: Federico Mena Quintero <federico gnu org>


Modified:
   trunk/ChangeLog
   trunk/gtk/gtkfilesystemunix.c

Modified: trunk/gtk/gtkfilesystemunix.c
==============================================================================
--- trunk/gtk/gtkfilesystemunix.c	(original)
+++ trunk/gtk/gtkfilesystemunix.c	Wed Apr  2 17:48:15 2008
@@ -1470,10 +1470,11 @@
       home = passwd->pw_dir;
     }
 
+  /* We put G_DIR_SEPARATOR_S so that empty basenames will make the resulting path end in a slash */
   if (slash)
     return g_build_filename (home, G_DIR_SEPARATOR_S, slash + 1, NULL);
   else
-    return g_strdup (home);
+    return g_build_filename (home, G_DIR_SEPARATOR_S, NULL);
 }
 
 static gboolean



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