]> git.sesse.net Git - vlc/commitdiff
Fix [21233]
authorChristophe Mutricy <xtophe@videolan.org>
Sun, 19 Aug 2007 15:05:30 +0000 (15:05 +0000)
committerChristophe Mutricy <xtophe@videolan.org>
Sun, 19 Aug 2007 15:05:30 +0000 (15:05 +0000)
modules/meta_engine/luameta.c

index 22f50785436e4559bec1421010f91037fb985847..c6fb311775d9f92d78a58d12cd4819b751a8a0cc 100644 (file)
@@ -328,12 +328,16 @@ static int vlclua_scripts_batch_execute( vlc_object_t *p_this,
         if( ( utf8_stat( "share/luaplaylist", &stat_info ) == -1 )
             || !S_ISDIR( stat_info.st_mode ) )
         {
-            ppsz_dir_list[1] = strdup( DATA_PATH "/luaplaylist" );
+            if( asprintf( &ppsz_dir_list[1], 
+                          DATA_PATH DIR_SEP "%s", luadirname ) < 0 )
+                return VLC_ENOMEM;
         }
         else
 #   endif
         {
-            ppsz_dir_list[1] = strdup( "share/luaplaylist" );
+            if( asprintf( &ppsz_dir_list[1], 
+                          "share" DIR_SEP "%s", luadirname ) < 0 )
+                return VLC_ENOMEM;
         }
     }
 #   endif