]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/gpe-nmf/gpe-nmf-0.22/playlist-segfault.patch
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / gpe-nmf / gpe-nmf-0.22 / playlist-segfault.patch
1 Index: playlist_edit.c
2 ===================================================================
3 RCS file: /cvs/gpe/base/gpe-nmf/playlist_edit.c,v
4 retrieving revision 1.21
5 retrieving revision 1.22
6 diff -B -b -u -r1.21 -r1.22
7 --- playlist_edit.c     8 Jul 2005 14:40:33 -0000       1.21
8 +++ playlist_edit.c     11 Jan 2006 23:23:32 -0000      1.22
9 @@ -172,8 +172,16 @@
10  
11    if (fe->current_path)
12        g_free(fe->current_path);
13 -  fe->current_path = isdir(s) ? g_strdup(s) : g_path_get_dirname (s);
14 -      strcat(fe->current_path,"/");
15 +  if (isdir (s))
16 +    {
17 +      fe->current_path = g_strdup_printf ("%s/", s);
18 +    }
19 +  else
20 +    {
21 +      gchar *dir = g_path_get_dirname (s);
22 +      fe->current_path = g_strdup_printf ("%s/", dir);
23 +      g_free (dir);
24 +    }
25    
26    fe->fs_open = FALSE;
27