diff options
author | des <des@FreeBSD.org> | 2000-07-20 02:03:56 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2000-07-20 02:03:56 +0000 |
commit | a260febdf9a88b98088a64af2f0a3bee88ef86ce (patch) | |
tree | f98d3c58456f340422650733a55083554dbcfd6f /lib | |
parent | 23f64484857687c3f927f9b7557805b2b3f83fb8 (diff) | |
download | FreeBSD-src-a260febdf9a88b98088a64af2f0a3bee88ef86ce.zip FreeBSD-src-a260febdf9a88b98088a64af2f0a3bee88ef86ce.tar.gz |
Fix the case where the file name is preceded by a lone slash.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libfetch/ftp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libfetch/ftp.c b/lib/libfetch/ftp.c index 6fb16b2..05f429b 100644 --- a/lib/libfetch/ftp.c +++ b/lib/libfetch/ftp.c @@ -217,7 +217,7 @@ _ftp_cwd(int cd, char *file) char *s; int e; - if ((s = strrchr(file, '/')) == NULL) { + if ((s = strrchr(file, '/')) == NULL || s == file) { e = _ftp_cmd(cd, "CWD /"); } else { e = _ftp_cmd(cd, "CWD %.*s", s - file, file); |