]> sjero.net Git - wget/blobdiff - src/main.c
Exit with failure if -k is specified and -O is not a regular file.
[wget] / src / main.c
index 8cacb893f36d74ccba329921c6a94fa7db2abccb..9edec13b67919b4cc942dc3872dc0e39ae6038b7 100644 (file)
@@ -1217,6 +1217,13 @@ WARNING: Can't reopen standard output in binary mode;\n\
           if (fstat (fileno (output_stream), &st) == 0 && S_ISREG (st.st_mode))
             output_stream_regular = true;
         }
+      if (!output_stream_regular && opt.convert_links)
+        {
+          printf (_("-k can be used together with -O only if outputting to \
+a regular file.\n"));
+          print_usage ();
+          exit(1);
+        }
     }
 
 #ifdef __VMS