[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 68f5718: Fix some regressions introduced by the previous dired-au
From: |
Lars Ingebrigtsen |
Subject: |
master 68f5718: Fix some regressions introduced by the previous dired-aux change |
Date: |
Tue, 18 May 2021 11:49:15 -0400 (EDT) |
branch: master
commit 68f5718c0a4393391ce3c4179e8ab1430e5b0119
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Fix some regressions introduced by the previous dired-aux change
* lisp/dired-aux.el (dired-compress-file): Check that the file
we're compressing exists. Also work outside the current directory.
---
lisp/dired-aux.el | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index 2e4ff93..eb43ab1 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -1334,7 +1334,8 @@ Return nil if no change in files."
(user-error "No compression rule found for suffix %s, \
see `dired-compress-file-alist' for the supported suffixes list."
dired-compress-file-default-suffix)
- (and (or (not (file-exists-p out-name))
+ (and (file-exists-p file)
+ (or (not (file-exists-p out-name))
(y-or-n-p
(format
"File %s already exists. Really compress? "
@@ -1343,8 +1344,7 @@ see `dired-compress-file-alist' for the supported
suffixes list."
(replace-regexp-in-string
"%o" (shell-quote-argument out-name)
(replace-regexp-in-string
- "%i" (shell-quote-argument
- (file-name-nondirectory file))
+ "%i" (shell-quote-argument file)
(cdr rule)
nil t)
nil t))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 68f5718: Fix some regressions introduced by the previous dired-aux change,
Lars Ingebrigtsen <=