[vlc-devel] commit: plugins must match "lib*_plugin"LIBEXT, not just "*"LIBEXT ( Rémi Denis-Courmont )

git version control git at videolan.org
Mon Jan 25 21:42:04 CET 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Jan 25 22:25:18 2010 +0200| [91079ddc77238cabf02afb51ccb9bdbbf5218355] | committer: Rémi Denis-Courmont 

plugins must match "lib*_plugin"LIBEXT, not just "*"LIBEXT

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=91079ddc77238cabf02afb51ccb9bdbbf5218355
---

 src/modules/modules.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/modules/modules.c b/src/modules/modules.c
index 267267c..aef2822 100644
--- a/src/modules/modules.c
+++ b/src/modules/modules.c
@@ -898,10 +898,11 @@ static void AllocatePluginDir( vlc_object_t *p_this, module_bank_t *p_bank,
             AllocatePluginDir (p_this, p_bank, path, i_maxdepth - 1);
         else
         if (S_ISREG (st.st_mode)
-         && ((size_t)pathlen >= strlen (LIBEXT))
-         && !strncasecmp (path + pathlen - strlen (LIBEXT), LIBEXT,
-                          strlen (LIBEXT)))
-            /* ^^ We only load files ending with LIBEXT */
+         && strncmp (path, "lib", 3)
+         && ((size_t)pathlen >= sizeof ("_plugin"LIBEXT))
+         && !strncasecmp (path + pathlen - strlen ("_plugin"LIBEXT),
+                          "_plugin"LIBEXT, strlen ("_plugni"LIBEXT)))
+            /* ^^ We only load files matching "lib*_plugin"LIBEXT */
             AllocatePluginFile (p_this, p_bank, path, st.st_mtime, st.st_size);
 
         free (path);




More information about the vlc-devel mailing list