Accept file:// URIs starting with an antislash
authorPierre Ynard <linkfanel@yahoo.fr>
Tue, 16 Jun 2009 11:17:03 +0000 (13:17 +0200)
committerPierre Ynard <linkfanel@yahoo.fr>
Tue, 16 Jun 2009 11:17:03 +0000 (13:17 +0200)
Yes it's invalid, but there's little point in rejecting it

src/input/input.c

index 51c22b1..3704862 100644 (file)
@@ -2350,7 +2350,12 @@ static int InputSourceInit( input_thread_t *p_input,
      * for non-standard VLC-specific schemes. */
     if( !strcmp( psz_access, "file" ) )
     {
-        if( psz_path[0] != '/' )
+        if( psz_path[0] != '/'
+#if (DIR_SEP_CHAR != '/')
+            /* We accept invalid URIs too. */
+            && psz_path[0] != DIR_SEP_CHAR
+#endif
+          )
         {   /* host specified -> not supported currently */
             msg_Err( p_input, "cannot open remote file `%s://%s'",
                      psz_access, psz_path );