]> git.sesse.net Git - vlc/commitdiff
Look for luameta script in share/luameta dor the case where you run from your source...
authorChristophe Mutricy <xtophe@videolan.org>
Sun, 19 Aug 2007 12:42:24 +0000 (12:42 +0000)
committerChristophe Mutricy <xtophe@videolan.org>
Sun, 19 Aug 2007 12:42:24 +0000 (12:42 +0000)
modules/meta_engine/luameta.c

index 10f16693b51e446f7d15ae83b203b61ced0a1a64..109a42e08c1ee7591a0468df41a17f5c0b6fcd53 100644 (file)
@@ -317,6 +317,21 @@ static int vlclua_scripts_batch_execute( vlc_object_t *p_this,
         if( asprintf( &ppsz_dir_list[2], "%s" DIR_SEP "share" DIR_SEP "%s", psz_vlcpath, luadirname )  < 0 )
             return VLC_ENOMEM;
     }
+#   else
+    {
+#   ifdef HAVE_SYS_STAT_H
+        struct stat stat_info;
+        if( ( utf8_stat( "share/luaplaylist", &stat_info ) == -1 )
+            || !S_ISDIR( stat_info.st_mode ) )
+        {
+            ppsz_dir_list[1] = strdup( DATA_PATH "/luaplaylist" );
+        }
+        else
+#   endif
+        {
+            ppsz_dir_list[1] = strdup( "share/luaplaylist" );
+        }
+    }
 #   endif
 
     for( ppsz_dir = ppsz_dir_list; *ppsz_dir; ppsz_dir++ )