From 7c4d12ee3b57cc2b645b21b1fd78c6cce995e3b3 Mon Sep 17 00:00:00 2001 From: Marian Durkovic Date: Tue, 25 Oct 2005 07:02:52 +0000 Subject: [PATCH] FTP URLs are relative to user's default directory (RFC1738) For absolute path use ftp://foo.bar//usr/local/etc/filename -This line, and those below, will be ignored-- M modules/access/ftp.c --- modules/access/ftp.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/access/ftp.c b/modules/access/ftp.c index fee459bbe7..ccc10ce0cb 100644 --- a/modules/access/ftp.c +++ b/modules/access/ftp.c @@ -238,6 +238,12 @@ static int Open( vlc_object_t *p_this ) p_sys->url.i_port = 21; /* default port */ } + /* FTP URLs are relative to user's default directory (RFC1738) + For absolute path use ftp://foo.bar//usr/local/etc/filename */ + + if( *p_sys->url.psz_path == '/' ) + p_sys->url.psz_path++; + if( Connect( p_access, p_sys ) < 0 ) goto exit_error; -- 2.39.5