]> git.sesse.net Git - vlc/commitdiff
FTP URLs are relative to user's default directory (RFC1738)
authorMarian Durkovic <md@videolan.org>
Tue, 25 Oct 2005 07:02:52 +0000 (07:02 +0000)
committerMarian Durkovic <md@videolan.org>
Tue, 25 Oct 2005 07:02:52 +0000 (07:02 +0000)
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

index fee459bbe78e50297239eb3f2165f5cf28a9fd36..ccc10ce0cbff24c2ed41e0a5f67d8bcf1cd883df 100644 (file)
@@ -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;