summaryrefslogtreecommitdiff
path: root/lisp/net/tramp-cache.el
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2015-04-03 18:52:27 +0200
committerMichael Albinus <michael.albinus@gmx.de>2015-04-03 18:52:27 +0200
commit8596eb1282c4d5bdb22b20c155183b39fdc8eb00 (patch)
tree84dfcf369901b9d625e5fef0b18582e6560419d1 /lisp/net/tramp-cache.el
parentc775195c62843deed10e7967e488b3b04b84c412 (diff)
downloademacs-8596eb1282c4d5bdb22b20c155183b39fdc8eb00.tar.gz
Fix Bug#20249
Fixes: debbugs:20249 * net/tramp-cache.el (tramp-flush-file-property) (tramp-flush-directory-property): Use `directory-file-name' of the truename.
Diffstat (limited to 'lisp/net/tramp-cache.el')
-rw-r--r--lisp/net/tramp-cache.el12
1 files changed, 7 insertions, 5 deletions
diff --git a/lisp/net/tramp-cache.el b/lisp/net/tramp-cache.el
index 1e24ea53f43..155053c5cdb 100644
--- a/lisp/net/tramp-cache.el
+++ b/lisp/net/tramp-cache.el
@@ -168,14 +168,16 @@ Returns VALUE."
;;;###tramp-autoload
(defun tramp-flush-file-property (key file)
"Remove all properties of FILE in the cache context of KEY."
- ;; Remove file properties of symlinks.
- (let ((truename (tramp-get-file-property key file "file-truename" nil)))
+ (let* ((file (tramp-run-real-handler
+ 'directory-file-name (list file)))
+ (truename (tramp-get-file-property key file "file-truename" nil)))
+ ;; Remove file properties of symlinks.
(when (and (stringp truename)
- (not (string-equal file truename)))
+ (not (string-equal file (directory-file-name truename))))
(tramp-flush-file-property key truename)))
;; Unify localname.
(setq key (copy-sequence key))
- (aset key 3 (tramp-run-real-handler 'directory-file-name (list file)))
+ (aset key 3 file)
(tramp-message key 8 "%s" file)
(remhash key tramp-cache-data))
@@ -188,7 +190,7 @@ Remove also properties of all files in subdirectories."
(truename (tramp-get-file-property key directory "file-truename" nil)))
;; Remove file properties of symlinks.
(when (and (stringp truename)
- (not (string-equal directory truename)))
+ (not (string-equal directory (directory-file-name truename))))
(tramp-flush-directory-property key truename))
(tramp-message key 8 "%s" directory)
(maphash