[vlc-devel] commit: LUA: don't reinvent scandir ( Rémi Denis-Courmont )
git version control
git at videolan.org
Sat May 3 22:49:46 CEST 2008
vlc | branch: master | Rémi Denis-Courmont <rem at videolan.org> | Sat May 3 23:50:55 2008 +0300| [4724e090bc4e2663553d39709a8e8e2e59d7a85e]
LUA: don't reinvent scandir
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4724e090bc4e2663553d39709a8e8e2e59d7a85e
---
modules/misc/lua/vlc.c | 13 +------------
1 files changed, 1 insertions(+), 12 deletions(-)
diff --git a/modules/misc/lua/vlc.c b/modules/misc/lua/vlc.c
index d985340..2c356ee 100644
--- a/modules/misc/lua/vlc.c
+++ b/modules/misc/lua/vlc.c
@@ -460,7 +460,6 @@ int vlclua_scripts_batch_execute( vlc_object_t *p_this,
{
int i_ret = VLC_EGENERIC;
- DIR *dir = NULL;
char **ppsz_filelist = NULL;
char **ppsz_fileend = NULL;
char **ppsz_file;
@@ -487,16 +486,8 @@ int vlclua_scripts_batch_execute( vlc_object_t *p_this,
ppsz_filelist = NULL;
}
- if( dir )
- {
- closedir( dir );
- }
-
msg_Dbg( p_this, "Trying Lua scripts in %s", *ppsz_dir );
- dir = utf8_opendir( *ppsz_dir );
-
- if( !dir ) continue;
- i_files = utf8_loaddir( dir, &ppsz_filelist, file_select,
+ i_files = utf8_scandir( *ppsz_dir, &ppsz_filelist, file_select,
file_compare );
if( i_files < 1 ) continue;
ppsz_fileend = ppsz_filelist + i_files;
@@ -528,8 +519,6 @@ int vlclua_scripts_batch_execute( vlc_object_t *p_this,
for( ppsz_dir = ppsz_dir_list; *ppsz_dir; ppsz_dir++ )
free( *ppsz_dir );
- if( dir ) closedir( dir );
-
return i_ret;
}
More information about the vlc-devel
mailing list