[vlc-commits] darwin/dirs: fix plugin lookup with the NPAPI plugin

Felix Paul Kühne git at videolan.org
Mon Jan 27 18:37:21 CET 2014


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Mon Jan 27 18:33:51 2014 +0100| [50bf597dcf5fd810b4c2babbbbd7e24d328ae07b] | committer: Felix Paul Kühne

darwin/dirs: fix plugin lookup with the NPAPI plugin

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

 src/darwin/dirs.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/darwin/dirs.c b/src/darwin/dirs.c
index 1c753de..83c27a4 100644
--- a/src/darwin/dirs.c
+++ b/src/darwin/dirs.c
@@ -70,6 +70,10 @@ static char *config_GetLibPath (void)
         size_t len = strlen(psz_img_name);
         if( len >= 3 && !strcmp( psz_img_name + len - 3, "VLC") )
             return strdup( psz_img_name );
+
+        /* Do we end by "VLC-Plugin"? oh, we must be the NPAPI plugin */
+        if( len >= 10 && !strcmp( psz_img_name + len - 10, "VLC-Plugin") )
+            return strdup( psz_img_name );
     }
 
     /* We are not linked to the VLC.framework, let's use dladdr to figure
@@ -82,7 +86,7 @@ static char *config_GetLibPath (void)
     uint32_t path_len = sizeof(path) - 1;
 
     if ( !_NSGetExecutablePath(path, &path_len) )
-         return strdup(path);
+        return strdup(path);
     return NULL;
 }
 



More information about the vlc-commits mailing list