diff options
| author | Max | 2017-11-01 02:33:59 +0300 |
|---|---|---|
| committer | Noam Postavsky | 2017-12-11 17:38:28 -0500 |
| commit | cd53b6399b187f5a6719dd58a489f4c55fd094aa (patch) | |
| tree | 247d68b2ed5b10d077e328370c0bd69a4dc218ef /lisp | |
| parent | 51911dae14ecaf6c6eb22641c3189c6fa97ab24a (diff) | |
| download | emacs-cd53b6399b187f5a6719dd58a489f4c55fd094aa.tar.gz emacs-cd53b6399b187f5a6719dd58a489f4c55fd094aa.zip | |
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')
| -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)." | |||
| 974 | ;; "tar -zxf" isn't used because it's not available on the | 974 | ;; "tar -zxf" isn't used because it's not available on the |
| 975 | ;; Solaris10 version of tar. Solaris10 becomes obsolete in 2021. | 975 | ;; Solaris10 version of tar. Solaris10 becomes obsolete in 2021. |
| 976 | ;; Same thing on AIX 7.1. | 976 | ;; Same thing on AIX 7.1. |
| 977 | ("\\.tar\\.gz\\'" "" "gzip -dc %i | tar -xv") | 977 | ("\\.tar\\.gz\\'" "" "gzip -dc %i | tar -xf -") |
| 978 | ("\\.tgz\\'" "" "gzip -dc %i | tar -xv") | 978 | ("\\.tgz\\'" "" "gzip -dc %i | tar -xf -") |
| 979 | ("\\.gz\\'" "" "gunzip") | 979 | ("\\.gz\\'" "" "gunzip") |
| 980 | ("\\.Z\\'" "" "uncompress") | 980 | ("\\.Z\\'" "" "uncompress") |
| 981 | ;; For .z, try gunzip. It might be an old gzip file, | 981 | ;; 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)." | |||
| 990 | ;; This item controls naming for compression. | 990 | ;; This item controls naming for compression. |
| 991 | ("\\.tar\\'" ".tgz" nil) | 991 | ("\\.tar\\'" ".tgz" nil) |
| 992 | ;; This item controls the compression of directories | 992 | ;; This item controls the compression of directories |
| 993 | (":" ".tar.gz" "tar -c %i | gzip -c9 > %o")) | 993 | (":" ".tar.gz" "tar -cf - %i | gzip -c9 > %o")) |
| 994 | "Control changes in file name suffixes for compression and uncompression. | 994 | "Control changes in file name suffixes for compression and uncompression. |
| 995 | Each element specifies one transformation rule, and has the form: | 995 | Each element specifies one transformation rule, and has the form: |
| 996 | (REGEXP NEW-SUFFIX PROGRAM) | 996 | (REGEXP NEW-SUFFIX PROGRAM) |
| @@ -1007,9 +1007,9 @@ Otherwise, the rule is a compression rule, and compression is done with gzip. | |||
| 1007 | ARGS are command switches passed to PROGRAM.") | 1007 | ARGS are command switches passed to PROGRAM.") |
| 1008 | 1008 | ||
| 1009 | (defvar dired-compress-files-alist | 1009 | (defvar dired-compress-files-alist |
| 1010 | '(("\\.tar\\.gz\\'" . "tar -c %i | gzip -c9 > %o") | 1010 | '(("\\.tar\\.gz\\'" . "tar -cf - %i | gzip -c9 > %o") |
| 1011 | ("\\.tar\\.bz2\\'" . "tar -c %i | bzip2 -c9 > %o") | 1011 | ("\\.tar\\.bz2\\'" . "tar -cf - %i | bzip2 -c9 > %o") |
| 1012 | ("\\.tar\\.xz\\'" . "tar -c %i | xz -c9 > %o") | 1012 | ("\\.tar\\.xz\\'" . "tar -cf - %i | xz -c9 > %o") |
| 1013 | ("\\.zip\\'" . "zip %o -r --filesync %i")) | 1013 | ("\\.zip\\'" . "zip %o -r --filesync %i")) |
| 1014 | "Control the compression shell command for `dired-do-compress-to'. | 1014 | "Control the compression shell command for `dired-do-compress-to'. |
| 1015 | 1015 | ||