Commit 0ad85b85 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

FTP: fix relative file paths (fix #3984)

parent dae4a34f
...@@ -303,11 +303,16 @@ static int parseURL( vlc_url_t *url, const char *path ) ...@@ -303,11 +303,16 @@ static int parseURL( vlc_url_t *url, const char *path )
if( url->i_port <= 0 ) if( url->i_port <= 0 )
url->i_port = IPPORT_FTP; /* default port */ url->i_port = IPPORT_FTP; /* default port */
if( url->psz_path == NULL )
return VLC_SUCCESS;
/* FTP URLs are relative to user's default directory (RFC1738 §3.2) /* FTP URLs are relative to user's default directory (RFC1738 §3.2)
For absolute path use ftp://foo.bar//usr/local/etc/filename */ For absolute path use ftp://foo.bar//usr/local/etc/filename */
/* FIXME: we should issue a series of CWD, one per slash */ /* FIXME: we should issue a series of CWD, one per slash */
if( url->psz_path == NULL ) if( url->psz_path )
return VLC_SUCCESS; {
assert( url->psz_path[0] == '/' );
url->psz_path++;
}
char *type = strstr( url->psz_path, ";type=" ); char *type = strstr( url->psz_path, ";type=" );
if( type ) if( type )
......
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