]> sjero.net Git - wget/blobdiff - src/main.c
Merging heads.
[wget] / src / main.c
index e239b6d009ff0aa71456ed150aacc7a69c585e0b..159973a0021a2e36e80d5c389f8c40fa38f3b91e 100644 (file)
@@ -920,6 +920,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 (opt.ask_passwd && opt.passwd)