From: RĂ©mi Denis-Courmont Date: Sat, 5 Jul 2008 10:53:52 +0000 (+0300) Subject: LUA: don't look for scripts in . X-Git-Tag: 0.9.0-test2~268 X-Git-Url: https://git.sesse.net/?p=vlc;a=commitdiff_plain;h=7291c4595b9c85d2986afa6863fafc6d490f5986 LUA: don't look for scripts in . 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. --- diff --git a/modules/misc/lua/vlc.c b/modules/misc/lua/vlc.c index 32cc2ab359..ad5c0b568c 100644 --- a/modules/misc/lua/vlc.c +++ b/modules/misc/lua/vlc.c @@ -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;