diff options
author | foobar <sniper@php.net> | 2000-11-03 21:53:24 +0000 |
---|---|---|
committer | foobar <sniper@php.net> | 2000-11-03 21:53:24 +0000 |
commit | 1f00cff3ab44734ceccd49152a58a203ff344151 (patch) | |
tree | b6d3612ebc2f779e254654c1bef3a7d4f9769812 /ext/ftp | |
parent | 848d3538801ce6e6f4e6c58beb27dd9ca804dc5f (diff) | |
download | php-git-1f00cff3ab44734ceccd49152a58a203ff344151.tar.gz |
Fixed ftp_mkdir(). It return the dirname passed to it in case of
braindead ftp server which doesn't put the real path into reply.
PR: 7216
Diffstat (limited to 'ext/ftp')
-rw-r--r-- | ext/ftp/ftp.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c index b2cf0d9fa5..c6deea8c77 100644 --- a/ext/ftp/ftp.c +++ b/ext/ftp/ftp.c @@ -378,8 +378,11 @@ ftp_mkdir(ftpbuf_t *ftp, const char *dir) return NULL; /* copy out the dir from response */ - if ((mkd = strchr(ftp->inbuf, '"')) == NULL) - return NULL; + if ((mkd = strchr(ftp->inbuf, '"')) == NULL) { + mkd = strdup(dir); + return mkd; + } + end = strrchr(++mkd, '"'); *end = 0; mkd = strdup(mkd); |