mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Fix the case where the file name is preceded by a lone slash.
This commit is contained in:
parent
b31edf0c1b
commit
5e3f46b51a
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue