summaryrefslogtreecommitdiff
path: root/ftp.c
diff options
context:
space:
mode:
Diffstat (limited to 'ftp.c')
-rw-r--r--ftp.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/ftp.c b/ftp.c
index 17c2f5eef..2e6fcb7f9 100644
--- a/ftp.c
+++ b/ftp.c
@@ -500,9 +500,11 @@ fprintf(stderr, "-> ABOR\n");
}
static int ftpGetFileDone(urlinfo *u) {
- if (u->ftpGetFileDoneNeeded && ftpCheckResponse(u, NULL))
- return FTPERR_BAD_SERVER_RESPONSE;
- u->ftpGetFileDoneNeeded = 0;
+ if (u->ftpGetFileDoneNeeded) {
+ u->ftpGetFileDoneNeeded = 0;
+ if (ftpCheckResponse(u, NULL))
+ return FTPERR_BAD_SERVER_RESPONSE;
+ }
return 0;
}