Commit caa3a6c5 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

LUA: check libdir before datadir

parent 22a57c82
...@@ -162,6 +162,12 @@ int vlclua_dir_list( vlc_object_t *p_this, const char *luadirname, ...@@ -162,6 +162,12 @@ int vlclua_dir_list( vlc_object_t *p_this, const char *luadirname,
i++; i++;
free( datadir ); free( datadir );
#if !(defined(__APPLE__) || defined(SYS_BEOS) || defined(WIN32))
if( likely(asprintf( &ppsz_dir_list[i], "%s"DIR_SEP"lua"DIR_SEP"%s",
config_GetLibDir(), luadirname ) != -1) )
i++;
#endif
char *psz_datapath = config_GetDataDir( p_this ); char *psz_datapath = config_GetDataDir( p_this );
if( likely(psz_datapath != NULL) ) if( likely(psz_datapath != NULL) )
{ {
...@@ -178,12 +184,6 @@ int vlclua_dir_list( vlc_object_t *p_this, const char *luadirname, ...@@ -178,12 +184,6 @@ int vlclua_dir_list( vlc_object_t *p_this, const char *luadirname,
free( psz_datapath ); free( psz_datapath );
} }
#if !(defined(__APPLE__) || defined(SYS_BEOS) || defined(WIN32))
if( likely(asprintf( &ppsz_dir_list[i], "%s"DIR_SEP"lua"DIR_SEP"%s",
config_GetLibDir(), luadirname ) != -1) )
i++;
#endif
ppsz_dir_list[i] = NULL; ppsz_dir_list[i] = NULL;
return VLC_SUCCESS; return VLC_SUCCESS;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment