[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 87301f2623: Better support for remote file names in dired
From: |
Michael Albinus |
Subject: |
master 87301f2623: Better support for remote file names in dired |
Date: |
Thu, 6 Oct 2022 16:18:37 -0400 (EDT) |
branch: master
commit 87301f262357c8003fe1a02b58bfcc9dc9d82a14
Author: Michael Albinus <michael.albinus@gmx.de>
Commit: Michael Albinus <michael.albinus@gmx.de>
Better support for remote file names in dired
* lisp/dired.el (dired-make-relative): Expand DIR anyway, because
it could also be an abbreviated remote file name. (Bug#58300)
---
lisp/dired.el | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/lisp/dired.el b/lisp/dired.el
index 96b580d576..f9a7743139 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -2953,11 +2953,7 @@ Optional arg GLOBAL means to replace all matches."
If DIR is omitted or nil, it defaults to `default-directory'.
If FILE is not in the directory tree of DIR, return FILE
unchanged."
- (or dir (setq dir default-directory))
- ;; This case comes into play if default-directory is set to
- ;; use ~.
- (if (and (> (length dir) 0) (= (aref dir 0) ?~))
- (setq dir (expand-file-name dir)))
+ (setq dir (expand-file-name (or dir default-directory)))
(if (string-match (concat "^" (regexp-quote dir)) file)
(substring file (match-end 0))
file))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 87301f2623: Better support for remote file names in dired,
Michael Albinus <=