aboutsummaryrefslogtreecommitdiff
path: root/src/xz
diff options
context:
space:
mode:
Diffstat (limited to 'src/xz')
-rw-r--r--src/xz/args.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/xz/args.c b/src/xz/args.c
index cee5f202..8a5ce1f5 100644
--- a/src/xz/args.c
+++ b/src/xz/args.c
@@ -840,6 +840,11 @@ args_parse(args_info *args, int argc, char **argv)
if (opt_format == FORMAT_RAW && !suffix_is_set() && !opt_stdout
&& (opt_mode == MODE_COMPRESS
|| opt_mode == MODE_DECOMPRESS)) {
+ if (args->files_name != NULL)
+ message_fatal(_("With --format=raw, "
+ "--suffix=.SUF is required "
+ "unless writing to stdout"));
+
// If all of the filenames provided are "-" (more than one
// "-" could be specified) or no filenames are provided,
// then we are only going to be writing to standard out.