X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Fmain.c;h=fdf368a51fc2e897e9fc2e236a8d5e9744bea2f5;hp=421a5501b6e34e4795a9a62e779289e42aff1a2f;hb=888c30ba01f2ea7fe4ba1f24b536aafe887b2c37;hpb=1ddd88d7c5c32446cc6f8ea2ec4d97eba72bfb28 diff --git a/src/main.c b/src/main.c index 421a5501..fdf368a5 100644 --- a/src/main.c +++ b/src/main.c @@ -905,6 +905,12 @@ WARNING: timestamping does nothing in combination with -O. See the manual\n\ for details.\n\n")); opt.timestamping = false; } + if (opt.noclobber && file_exists_p(opt.output_document)) + { + /* Check if output file exists; if it does, exit. */ + logprintf (LOG_VERBOSE, _("File `%s' already there; not retrieving.\n"), opt.output_document); + exit(1); + } } if (!nurl && !opt.input_filename)