]> git.eshelyaron.com Git - emacs.git/commit
Fix compression of directories in Dired
authorEli Zaretskii <eliz@gnu.org>
Wed, 8 Jan 2020 16:21:53 +0000 (18:21 +0200)
committerEli Zaretskii <eliz@gnu.org>
Wed, 8 Jan 2020 16:21:53 +0000 (18:21 +0200)
commit6cd9ccb0a28ec03ffe180b7429e0378511b7d459
tree0f705f8ecff0bc6dd57eb25108c5654c46bfa157
parent42329e6d3b51dd7a9202cd1a98160d5e2db34509
Fix compression of directories in Dired

This fixes comporession and uncompression of directories on
MS-Windows, but also on other systems.  The original code used
":" as the REGEXP of the directory entry in
dired-compress-file-suffixes, which on Windows always matched any
absolute file name, and can also match unusual file names on Posix
hosts.  This false match would cause dired-compress-file to act as
if we are decompressing a directory, but use a command suitable
for compression, which would fail in interesting ways.
We now use a REGEXP that can never match any valid file name.

* lisp/dired-aux.el (dired-compress-file-suffixes): Make the
"compress directory" entry's REGEXP really fail to match any valid
file name.
(dired-compress-file): Adapt to the change in
dired-compress-file-suffixes.  (Bug#39024)
(dired-compress): If the current file is a directory, or if the
uncompressed file is a directory, don't remove the original from
the listing, since it is left in the filesystem.
lisp/dired-aux.el