]> git.sesse.net Git - vlc/blobdiff - src/modules/os.c
Use Unicode paths for plugins scan and ignore non-regular files
[vlc] / src / modules / os.c
index c77cc74563c991ef68dda24759a0ce92ee689fb2..b85fce2f13e9f05b4ecd6cd8d4ad80c20e28ba5e 100644 (file)
@@ -30,6 +30,7 @@
 
 #include <vlc_common.h>
 #include <vlc_plugin.h> /* MODULE_SUFFIX */
+#include <vlc_charset.h>
 #include "libvlc.h"
 #include "modules.h"
 
@@ -184,12 +185,13 @@ int module_Load( vlc_object_t *p_this, const char *psz_file,
 # else
     const int flags = 0;
 # endif
+    char *path = ToLocale( psz_file );
 
-    handle = dlopen( psz_file, flags );
+    handle = dlopen( path, flags );
+    LocaleFree( path );
     if( handle == NULL )
     {
-        msg_Warn( p_this, "cannot load module `%s' (%s)",
-                          psz_file, dlerror() );
+        msg_Warn( p_this, "cannot load module `%s' (%s)", path, dlerror() );
         return -1;
     }