]> git.sesse.net Git - vlc/commitdiff
* modules/control/http.c: small bug fix.
authorGildas Bazin <gbazin@videolan.org>
Wed, 15 Oct 2003 07:34:25 +0000 (07:34 +0000)
committerGildas Bazin <gbazin@videolan.org>
Wed, 15 Oct 2003 07:34:25 +0000 (07:34 +0000)
* mozilla/vlcshell.cpp: win32 fix.

modules/control/http.c
mozilla/vlcshell.cpp

index 9d066116bf563cbcbfcb6f1faeb657a173a340ae..99bbb8cefb2a0dd30fe20f6d72d6a3ffe8541ae1 100644 (file)
@@ -2,7 +2,7 @@
  * http.c :  http mini-server ;)
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: http.c,v 1.21 2003/08/01 17:30:33 fenrir Exp $
+ * $Id: http.c,v 1.22 2003/10/15 07:34:24 gbazin Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *          Laurent Aimar <fenrir@via.ecp.fr>
@@ -581,7 +581,7 @@ static int ParseDirectory( intf_thread_t *p_intf, char *psz_root,
 #define fold p_sys->pp_files[p_sys->i_files-1]
 
             /* FIXME for rep/ add rep (it would be better to do a redirection) */
-            if( strlen(fold->name) > 1 &&
+            if( p_sys->i_files && strlen(fold->name) > 1 &&
                 fold->name[strlen(fold->name) - 1] == '/' )
             {
                 f = malloc( sizeof( httpd_file_callback_args_t ) );
index ed64cdfaf879f4cb57c410dee49c24b81b643208..998c40bcbcbf9b471463de0271c4654a68c7f201 100644 (file)
@@ -2,7 +2,7 @@
  * vlcshell.cpp: a VLC plugin for Mozilla
  *****************************************************************************
  * Copyright (C) 2002 VideoLAN
- * $Id: vlcshell.cpp,v 1.24 2003/09/23 16:07:48 gbazin Exp $
+ * $Id: vlcshell.cpp,v 1.25 2003/10/15 07:34:25 gbazin Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -302,11 +302,10 @@ NPError NPP_New( NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc,
         ppsz_argv[2] = plugin_path;
 
 #elif defined(XP_WIN)
-        char *ppsz_argv[] = { "vlc", "--plugin-path", NULL, "-vv" };
+        char *ppsz_argv[] = { NULL, "-vv" };
         HKEY h_key;
-        DWORD i_type, i_data;
+        DWORD i_type, i_data = MAX_PATH + 1;
         char p_data[MAX_PATH + 1];
-
         if( RegOpenKeyEx( HKEY_LOCAL_MACHINE, "Software\\VideoLAN\\VLC",
                           0, KEY_READ, &h_key ) == ERROR_SUCCESS )
         {
@@ -315,14 +314,14 @@ NPError NPP_New( NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc,
              {
                  if( i_type == REG_SZ )
                  {
-                     strcat( p_data, "\\plugins" );
-                     ppsz_argv[2] = p_data;
+                     strcat( p_data, "\\vlc" );
+                     ppsz_argv[0] = p_data;
                  }
              }
              RegCloseKey( h_key );
         }
 
-        if( !ppsz_argv[2] ) ppsz_argv[2] = ".";
+        if( !ppsz_argv[0] ) ppsz_argv[0] = "vlc";
 
 #else
         char *ppsz_argv[] =