From 1f00cff3ab44734ceccd49152a58a203ff344151 Mon Sep 17 00:00:00 2001 From: foobar Date: Fri, 3 Nov 2000 21:53:24 +0000 Subject: [PATCH] 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 --- ext/ftp/ftp.c | 7 +++++-- 1 file 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); -- 2.50.1