]> git.sesse.net Git - vlc/commitdiff
LUA: check libdir before datadir
authorRémi Denis-Courmont <remi@remlab.net>
Sun, 14 Feb 2010 19:17:09 +0000 (21:17 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Sun, 14 Feb 2010 19:17:09 +0000 (21:17 +0200)
modules/misc/lua/vlc.c

index 9ebf9887c71daa2288170dc0361dcbae6efc60b3..017eabfdd6162f19a5adadd2edd0a1fd4e29d9e8 100644 (file)
@@ -162,6 +162,12 @@ int vlclua_dir_list( vlc_object_t *p_this, const char *luadirname,
         i++;
     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 );
     if( likely(psz_datapath != NULL) )
     {
@@ -178,12 +184,6 @@ int vlclua_dir_list( vlc_object_t *p_this, const char *luadirname,
         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;
     return VLC_SUCCESS;
 }