aboutsummaryrefslogtreecommitdiff
path: root/src/xz
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2009-02-08 18:17:05 +0200
committerLasse Collin <lasse.collin@tukaani.org>2009-02-08 18:17:05 +0200
commitae1ad9af54210c9a2be336b1316532da5071516c (patch)
tree46a90d0cf8b2b21b93018a15f735461167639b9d /src/xz
parentSupport both slash and backslash as path component (diff)
downloadxz-ae1ad9af54210c9a2be336b1316532da5071516c.tar.xz
Make "xz --force" to write to terminal as the error
message suggests.
Diffstat (limited to 'src/xz')
-rw-r--r--src/xz/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/xz/main.c b/src/xz/main.c
index b683cf9b..6c21cd2a 100644
--- a/src/xz/main.c
+++ b/src/xz/main.c
@@ -197,7 +197,7 @@ main(int argc, char **argv)
// Refuse to write compressed data to standard output if it is
// a terminal and --force wasn't used.
- if (opt_mode == MODE_COMPRESS) {
+ if (opt_mode == MODE_COMPRESS && !opt_force) {
if (opt_stdout || (args.arg_count == 1
&& strcmp(args.arg_names[0], "-") == 0)) {
if (is_tty_stdout()) {