Parcourir la source

(decode_options): Report error if -A or -r is used together with compression option.

Sergey Poznyakoff il y a 19 ans
Parent
commit
35b9ca72db
1 fichiers modifiés avec 4 ajouts et 1 suppressions
  1. 4 1
      src/tar.c

+ 4 - 1
src/tar.c

@@ -1759,8 +1759,11 @@ decode_options (int argc, char **argv)
     {
       if (multi_volume_option)
 	USAGE_ERROR ((0, 0, _("Cannot use multi-volume compressed archives")));
-      if (subcommand_option == UPDATE_SUBCOMMAND)
+      if (subcommand_option == UPDATE_SUBCOMMAND
+	  || subcommand_option == APPEND_SUBCOMMAND)
 	USAGE_ERROR ((0, 0, _("Cannot update compressed archives")));
+      if (subcommand_option == CAT_SUBCOMMAND)
+	USAGE_ERROR ((0, 0, _("Cannot concatenate compressed archives")));
     }
 
   /* It is no harm to use --pax-option on non-pax archives in archive