diff options
author | Max <mu@magi.net.ru> | 2017-11-01 02:33:59 +0300 |
---|---|---|
committer | Noam Postavsky <npostavs@gmail.com> | 2017-12-11 17:38:28 -0500 |
commit | cd53b6399b187f5a6719dd58a489f4c55fd094aa (patch) | |
tree | 247d68b2ed5b10d077e328370c0bd69a4dc218ef /lisp/dired-aux.el | |
parent | 51911dae14ecaf6c6eb22641c3189c6fa97ab24a (diff) | |
download | emacs-cd53b6399b187f5a6719dd58a489f4c55fd094aa.tar.gz |
Fix dired-do-compress when tar doesn't default to stdin (Bug#29094)
* lisp/dired-aux.el (dired-compress-file-suffixes): Use argument '-f-'
to write to stdout rather than relying on the default (the choice of
default is decided when compiling tar, BSD systems usually set it to a
tape drive). Drop '-v', since the output is not used anywhere.
Copyright-paperwork-exempt: yes
Diffstat (limited to 'lisp/dired-aux.el')
-rw-r--r-- | lisp/dired-aux.el | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 12a53e87057..c9042dba872 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -974,8 +974,8 @@ command with a prefix argument (the value does not matter)." ;; "tar -zxf" isn't used because it's not available on the ;; Solaris10 version of tar. Solaris10 becomes obsolete in 2021. ;; Same thing on AIX 7.1. - ("\\.tar\\.gz\\'" "" "gzip -dc %i | tar -xv") - ("\\.tgz\\'" "" "gzip -dc %i | tar -xv") + ("\\.tar\\.gz\\'" "" "gzip -dc %i | tar -xf -") + ("\\.tgz\\'" "" "gzip -dc %i | tar -xf -") ("\\.gz\\'" "" "gunzip") ("\\.Z\\'" "" "uncompress") ;; For .z, try gunzip. It might be an old gzip file, @@ -990,7 +990,7 @@ command with a prefix argument (the value does not matter)." ;; This item controls naming for compression. ("\\.tar\\'" ".tgz" nil) ;; This item controls the compression of directories - (":" ".tar.gz" "tar -c %i | gzip -c9 > %o")) + (":" ".tar.gz" "tar -cf - %i | gzip -c9 > %o")) "Control changes in file name suffixes for compression and uncompression. Each element specifies one transformation rule, and has the form: (REGEXP NEW-SUFFIX PROGRAM) @@ -1007,9 +1007,9 @@ Otherwise, the rule is a compression rule, and compression is done with gzip. ARGS are command switches passed to PROGRAM.") (defvar dired-compress-files-alist - '(("\\.tar\\.gz\\'" . "tar -c %i | gzip -c9 > %o") - ("\\.tar\\.bz2\\'" . "tar -c %i | bzip2 -c9 > %o") - ("\\.tar\\.xz\\'" . "tar -c %i | xz -c9 > %o") + '(("\\.tar\\.gz\\'" . "tar -cf - %i | gzip -c9 > %o") + ("\\.tar\\.bz2\\'" . "tar -cf - %i | bzip2 -c9 > %o") + ("\\.tar\\.xz\\'" . "tar -cf - %i | xz -c9 > %o") ("\\.zip\\'" . "zip %o -r --filesync %i")) "Control the compression shell command for `dired-do-compress-to'. |