[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 0c58796: * lisp/shadowfile.el (shadow-homedir): Add slash.
From: |
Michael Albinus |
Subject: |
master 0c58796: * lisp/shadowfile.el (shadow-homedir): Add slash. |
Date: |
Tue, 20 Jul 2021 12:44:59 -0400 (EDT) |
branch: master
commit 0c58796a2224e9b5d97a07033998099609150571
Author: Michael Albinus <michael.albinus@gmx.de>
Commit: Michael Albinus <michael.albinus@gmx.de>
* lisp/shadowfile.el (shadow-homedir): Add slash.
(shadow-contract-file-name): Use it. Bug#49596.
---
lisp/shadowfile.el | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/lisp/shadowfile.el b/lisp/shadowfile.el
index ec3a27b..f67b0b9 100644
--- a/lisp/shadowfile.el
+++ b/lisp/shadowfile.el
@@ -128,7 +128,7 @@ Default: ~/.emacs.d/shadow_todo"
(defvar shadow-system-name (concat "/" (system-name) ":")
"The identification for local files on this machine.")
-(defvar shadow-homedir "~"
+(defvar shadow-homedir "~/"
"Your home directory on this machine.")
;;;
@@ -352,15 +352,16 @@ Will return the name bare if it is a local file."
(defun shadow-contract-file-name (file)
"Simplify FILE.
-Do so by replacing (when possible) home directory with ~, and hostname
-with cluster name that includes it. Filename should be absolute and
-true."
+Do so by replacing (when possible) home directory with ~/, and
+hostname with cluster name that includes it. Filename should be
+absolute and true."
(let* ((hup (shadow-parse-name file))
(homedir (if (shadow-local-file hup)
shadow-homedir
(file-name-as-directory
(file-local-name
- (expand-file-name (shadow-make-fullname hup nil "~"))))))
+ (expand-file-name
+ (shadow-make-fullname hup nil shadow-homedir))))))
(suffix (shadow-suffix homedir (tramp-file-name-localname hup)))
(cluster (shadow-site-cluster (shadow-make-fullname hup nil ""))))
(when cluster
@@ -369,7 +370,7 @@ true."
(shadow-make-fullname
hup nil
(if suffix
- (concat "~/" suffix)
+ (concat shadow-homedir suffix)
(tramp-file-name-localname hup)))))
(defun shadow-same-site (pattern file)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 0c58796: * lisp/shadowfile.el (shadow-homedir): Add slash.,
Michael Albinus <=