aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/ftp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ftp.c b/lib/ftp.c
index dd10ad41c..11378b909 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -1928,7 +1928,7 @@ CURLcode ftp_perform(struct connectdata *conn,
/* This is a re-used connection. Since we change directory to where the
transfer is taking place, we must now get back to the original dir
where we ended up after login: */
- if (conn->bits.reuse) {
+ if (conn->bits.reuse && ftp->entrypath) {
if ((result = ftp_cwd(conn, ftp->entrypath)) != CURLE_OK)
return result;
}