Commit 27f49fef authored by Pierre d'Herbemont's avatar Pierre d'Herbemont Committed by Derk-Jan Hartman

input: Support file://localhost/file type url.

(cherry picked from commit 16f6bf94)
Signed-off-by: default avatarDerk-Jan Hartman <hartman@videolan.org>
parent fc4b656d
...@@ -2354,12 +2354,18 @@ static int InputSourceInit( input_thread_t *p_input, ...@@ -2354,12 +2354,18 @@ static int InputSourceInit( input_thread_t *p_input,
&& psz_path[0] != DIR_SEP_CHAR && psz_path[0] != DIR_SEP_CHAR
#endif #endif
) )
{ /* host specified -> not supported currently */ { /* host specified -> only localhost is supported */
msg_Err( p_input, "cannot open remote file `%s://%s'", static const unsigned localhostLen = 9; /* strlen("localhost") */
psz_access, psz_path ); if (!strncmp( psz_path, "localhost" DIR_SEP, localhostLen + 1))
msg_Info( p_input, "Did you mean `%s:///%s'?", psz_path += localhostLen;
psz_access, psz_path ); else
goto error; {
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;
}
} }
/* Remove HTML anchor if present (not supported). */ /* Remove HTML anchor if present (not supported). */
char *p = strchr( psz_path, '#' ); char *p = strchr( psz_path, '#' );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment