]> sjero.net Git - wget/blobdiff - src/main.c
Downgrade -r, -p with -O to a warning rather than an error; elaborate about bad combi...
[wget] / src / main.c
index b1e99695f19f124bc45af691a145be5b9324bc98..1ad0a48cc8c273ae559e426132034b13f9109ef0 100644 (file)
@@ -880,22 +880,31 @@ Can't timestamp and not clobber old files at the same time.\n"));
       exit (1);
     }
 #endif
-  if (opt.output_document
-      && (opt.page_requisites
-          || opt.recursive
-          || opt.timestamping))
+  if (opt.output_document)
     {
-          printf (_("Cannot specify -r, -p or -N if -O is given.\n"));
+      if (opt.convert_links 
+          && (nurl > 1 || opt.page_requisites || opt.recursive))
+        {
+          fputs (_("\
+Cannot specify both -k and -O if multiple URLs are given, or in combination\n\
+with -p or -r. See the manual for details.\n\n"), stdout);
           print_usage ();
           exit (1);
-    }
-  if (opt.output_document
-      && opt.convert_links 
-      && nurl > 1)
-    {
-          printf (_("Cannot specify both -k and -O if multiple URLs are given.\n"));
+        }
+      if (opt.page_requisites
+          || opt.recursive)
+        {
+          logprintf (LOG_NOTQUIET, "%s", _("\
+WARNING: combining -O with -r or -p will mean that all downloaded content\n\
+will be placed in the single file you specified.\n\n"));
+        }
+      if (opt.timestamping)
+        {
+          fputs (_("\
+Cannot specify -N if -O is given. See the manual for details.\n\n"), stdout);
           print_usage ();
           exit (1);
+        }
     }
 
   if (!nurl && !opt.input_filename)