X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Fftp.c;h=0321032168487d2eff9b66a13de03595b531ae4a;hp=115cc5c40d837ffd004a0a4797b16a3e94e35a5d;hb=9d5b9daf06153f06e46d5c3057993a0195c055e4;hpb=8179bb520d21dba6da9eed6493a72972baa6a7a8 diff --git a/src/ftp.c b/src/ftp.c index 115cc5c4..03210321 100644 --- a/src/ftp.c +++ b/src/ftp.c @@ -918,7 +918,7 @@ Error in server response, closing control connection.\n")); if (opt.backups) rotate_backups (con->target); - if (restval) + if (restval && !(con->cmd & DO_LIST)) fp = fopen (con->target, "ab"); else if (opt.noclobber || opt.always_rest || opt.timestamping || opt.dirstruct || opt.output_document) @@ -1141,7 +1141,9 @@ ftp_loop_internal (struct url *u, struct fileinfo *f, ccon *con) } /* Decide whether or not to restart. */ - if (opt.always_rest + if (con->cmd & DO_LIST) + restval = 0; + else if (opt.always_rest && stat (locf, &st) == 0 && S_ISREG (st.st_mode)) /* When -c is used, continue from on-disk size. (Can't use