X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Fftp.c;h=d2399311e6a56a2f0863b40668aa7b4109ad8bda;hp=7496a5aea914a418218a69f0d13031b28697c977;hb=b7a8c6d3f5d6555f323523c3b87507eebc1df3eb;hpb=28293eafd09e41d1cea22ebea291e669c7a8e8d9 diff --git a/src/ftp.c b/src/ftp.c index 7496a5ae..d2399311 100644 --- a/src/ftp.c +++ b/src/ftp.c @@ -1006,7 +1006,7 @@ ftp_loop_internal (struct urlinfo *u, struct fileinfo *f, ccon *con) /* --dont-remove-listing was specified, so do count this towards the number of bytes and files downloaded. */ { - opt.downloaded += len; + downloaded_increase (len); opt.numurls++; } @@ -1021,7 +1021,7 @@ ftp_loop_internal (struct urlinfo *u, struct fileinfo *f, ccon *con) downloaded if they're going to be deleted. People seeding proxies, for instance, may want to know how many bytes and files they've downloaded through it. */ - opt.downloaded += len; + downloaded_increase (len); opt.numurls++; if (opt.delete_after) @@ -1142,7 +1142,7 @@ ftp_retrieve_list (struct urlinfo *u, struct fileinfo *f, ccon *con) while (f) { - if (opt.quota && opt.downloaded > opt.quota) + if (downloaded_exceeds_quota ()) { --depth; return QUOTEXC; @@ -1308,7 +1308,7 @@ ftp_retrieve_dirs (struct urlinfo *u, struct fileinfo *f, ccon *con) { int len; - if (opt.quota && opt.downloaded > opt.quota) + if (downloaded_exceeds_quota ()) break; if (f->type != FT_DIRECTORY) continue; @@ -1429,7 +1429,7 @@ ftp_retrieve_glob (struct urlinfo *u, ccon *con, int action) } } freefileinfo (start); - if (opt.quota && opt.downloaded > opt.quota) + if (downloaded_exceeds_quota ()) return QUOTEXC; else /* #### Should we return `res' here? */