X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Fmain.c;h=0f059f76233950488dbe5460a65ef657346eee9f;hp=5c0b3315013189970e178752c35ffc4c4933dfbc;hb=b014f8fae9291e7504c0cca2dd8b9a0035466c03;hpb=9dadbf6fe9577a6a6b7e7bab4e4b782fc1a6f86c diff --git a/src/main.c b/src/main.c index 5c0b3315..0f059f76 100644 --- a/src/main.c +++ b/src/main.c @@ -44,6 +44,7 @@ as that of the covered work. */ #include #include +#include "exits.h" #include "utils.h" #include "init.h" #include "retr.h" @@ -1289,7 +1290,7 @@ WARNING: Can't reopen standard output in binary mode;\n\ else { status = retrieve_url (url_parsed, *t, &filename, &redirected_URL, - NULL, &dt, opt.recursive, iri); + NULL, &dt, opt.recursive, iri, true); } if (opt.delete_after && file_exists_p(filename)) @@ -1354,10 +1355,7 @@ WARNING: Can't reopen standard output in binary mode;\n\ xfree (url[i]); cleanup (); - if (status == RETROK) - return 0; - else - return 1; + return get_exit_status (); } #endif /* TESTING */