summaryrefslogtreecommitdiffstats
path: root/devel/gnome-vfs/files/patch-libgnomevfs_xdgmime.c
blob: 21ce335156a27469619ae528cbd03fcab6f8892c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--- libgnomevfs/xdgmime.c.orig  Wed Jan  7 13:44:02 2004
+++ libgnomevfs/xdgmime.c   Tue Jan 13 01:55:41 2004
@@ -97,7 +97,7 @@
 
       xdg_data_dirs = getenv ("XDG_DATA_DIRS");
       if (xdg_data_dirs == NULL)
-   xdg_data_dirs = "/usr/local/share/:/usr/share/";
+   xdg_data_dirs = "%%LOCALBASE%%/share/:/usr/share/";
 
       ptr = xdg_data_dirs;
 
@@ -121,8 +121,9 @@
        len = end_ptr - ptr;
      else
        len = end_ptr - ptr + 1;
-     dir = malloc (len);
+     dir = malloc (len + 1);
      strncpy (dir, ptr, len);
+     dir[len] = '\0';
      _xdg_mime_init_from_directory (dir);
      free (dir);