]> git.sesse.net Git - vlc/commitdiff
darwin/dirs: fix plugin lookup with the NPAPI plugin
authorFelix Paul Kühne <fkuehne@videolan.org>
Mon, 27 Jan 2014 17:33:51 +0000 (18:33 +0100)
committerFelix Paul Kühne <fkuehne@videolan.org>
Mon, 27 Jan 2014 17:37:11 +0000 (18:37 +0100)
src/darwin/dirs.c

index 1c753dee1d17e3b3ea0183ff18230e69b405e365..83c27a4b033c5ac100efeee7a5e9bb71560c4597 100644 (file)
@@ -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;
 }