From b981b0b38a1fc9286863d1225e6b10364de1d35b Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Mon, 10 May 2010 23:39:21 +0300 Subject: [PATCH] Remove the file:// URI decode hack --- src/input/input.c | 42 ------------------------------------------ 1 file changed, 42 deletions(-) diff --git a/src/input/input.c b/src/input/input.c index a29b3f70c1..94cd0eb410 100644 --- a/src/input/input.c +++ b/src/input/input.c @@ -2326,48 +2326,6 @@ static int InputSourceInit( input_thread_t *p_input, /* Split uri */ input_SplitMRL( &psz_access, &psz_demux, &psz_path, psz_dup ); - /* FIXME: file:// handling plugins do not support URIs properly... - * So we pre-decode the URI to a path for them. Note that we do not do it - * for non-standard VLC-specific schemes. */ - if( !strcmp( psz_access, "file" ) ) - { - if( psz_path[0] != '/' ) -#ifndef WIN32 - { /* host specified -> only localhost is supported */ - static const size_t i_localhost = sizeof("localhost")-1; - if( strncmp( psz_path, "localhost/", i_localhost + 1) != 0 ) - { - msg_Err( p_input, "cannot open remote file `%s://%s'", - psz_access, psz_path ); - msg_Info( p_input, "Did you mean `%s:///%s'?", - psz_access, psz_path ); - goto error; - } - psz_path += i_localhost; - } -#else - { - /* XXX: very very ugly. Always true for valid URIs though. */ - if( (psz_path - psz_dup) >= 2 && psz_path[-2] && psz_path[-1] ) - { - *(--psz_path) = '\\'; - *(--psz_path) = '\\'; - } - msg_Err( p_input, "REMOTE: %s", psz_path ); - } - else - /* Strip leading slash in front of the drive letter */ - psz_path++; -#endif - /* Then URI-decode the path. */ - decode_URI( psz_path ); -#if (DIR_SEP_CHAR != '/') - /* Turn slashes into anti-slashes */ - for( char *s = strchr( psz_path, '/' ); s; s = strchr( s + 1, '/' ) ) - *s = DIR_SEP_CHAR; -#endif - } - msg_Dbg( p_input, "`%s' gives access `%s' demux `%s' path `%s'", psz_mrl, psz_access, psz_demux, psz_path ); if( !p_input->b_preparsing ) -- 2.39.2