Commit 6cd9ccb
committed
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.1 parent 42329e6 commit 6cd9ccb
1 file changed
+12
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
992 | 992 | | |
993 | 993 | | |
994 | 994 | | |
995 | | - | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
996 | 1003 | | |
997 | 1004 | | |
998 | 1005 | | |
| |||
1020 | 1027 | | |
1021 | 1028 | | |
1022 | 1029 | | |
1023 | | - | |
1024 | | - | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
1025 | 1033 | | |
1026 | 1034 | | |
1027 | 1035 | | |
| |||
1145 | 1153 | | |
1146 | 1154 | | |
1147 | 1155 | | |
1148 | | - | |
| 1156 | + | |
1149 | 1157 | | |
1150 | 1158 | | |
1151 | 1159 | | |
| |||
0 commit comments