]> git.sesse.net Git - vlc/commitdiff
LUA: don't look for scripts in .
authorRémi Denis-Courmont <rdenis@simphalempin.com>
Sat, 5 Jul 2008 10:53:52 +0000 (13:53 +0300)
committerRémi Denis-Courmont <rdenis@simphalempin.com>
Sat, 5 Jul 2008 10:56:08 +0000 (13:56 +0300)
First, this would re-introduce the security issue we just fixed in
0.8.6f. Second, using share/ is not even the right path anyway.

modules/misc/lua/vlc.c

index 32cc2ab35907cc20815ffddab79588e9e80319c7..ad5c0b568c989175aea6952601cbc6089e5ea89e 100644 (file)
@@ -135,23 +135,9 @@ int vlclua_dir_list( const char *luadirname, char **ppsz_dir_list )
 
     }
 #   else
-    if( asprintf( &ppsz_dir_list[i],
-                  "share" DIR_SEP "lua" DIR_SEP "%s", luadirname ) < 0 )
+    if( asprintf( &ppsz_dir_list[i], "%s" DIR_SEP "lua" DIR_SEP "%s",
+                  config_GetDataDir (), luadirname ) < 0 )
         return VLC_ENOMEM;
-
-#   ifdef HAVE_SYS_STAT_H
-    {
-        struct stat stat_info;
-        if( ( utf8_stat( ppsz_dir_list[i], &stat_info ) == -1 )
-            || !S_ISDIR( stat_info.st_mode ) )
-        {
-            free(ppsz_dir_list[i]);
-            if( asprintf( &ppsz_dir_list[i], "%s" DIR_SEP "lua" DIR_SEP "%s",
-                          config_GetDataDir (), luadirname ) < 0 )
-                return VLC_ENOMEM;
-        }
-    }
-#   endif
     i++;
 #   endif
     return VLC_SUCCESS;