aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2015-04-03 18:52:27 +0200
committerMichael Albinus2015-04-03 18:52:27 +0200
commit8596eb1282c4d5bdb22b20c155183b39fdc8eb00 (patch)
tree84dfcf369901b9d625e5fef0b18582e6560419d1
parentc775195c62843deed10e7967e488b3b04b84c412 (diff)
downloademacs-8596eb1282c4d5bdb22b20c155183b39fdc8eb00.tar.gz
emacs-8596eb1282c4d5bdb22b20c155183b39fdc8eb00.zip
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.
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/net/tramp-cache.el12
2 files changed, 13 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 7a4293b16ef..5757317f5e2 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12015-04-03 Michael Albinus <michael.albinus@gmx.de>
2
3 * net/tramp-cache.el (tramp-flush-file-property)
4 (tramp-flush-directory-property): Use `directory-file-name' of the
5 truename. (Bug#20249)
6
12015-04-03 Nicolas Richard <theonewiththeevillook@yahoo.fr> 72015-04-03 Nicolas Richard <theonewiththeevillook@yahoo.fr>
2 8
3 * pcmpl-unix.el (pcmpl-ssh-known-hosts): Use `char-before' instead 9 * pcmpl-unix.el (pcmpl-ssh-known-hosts): Use `char-before' instead
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."
168;;;###tramp-autoload 168;;;###tramp-autoload
169(defun tramp-flush-file-property (key file) 169(defun tramp-flush-file-property (key file)
170 "Remove all properties of FILE in the cache context of KEY." 170 "Remove all properties of FILE in the cache context of KEY."
171 ;; Remove file properties of symlinks. 171 (let* ((file (tramp-run-real-handler
172 (let ((truename (tramp-get-file-property key file "file-truename" nil))) 172 'directory-file-name (list file)))
173 (truename (tramp-get-file-property key file "file-truename" nil)))
174 ;; Remove file properties of symlinks.
173 (when (and (stringp truename) 175 (when (and (stringp truename)
174 (not (string-equal file truename))) 176 (not (string-equal file (directory-file-name truename))))
175 (tramp-flush-file-property key truename))) 177 (tramp-flush-file-property key truename)))
176 ;; Unify localname. 178 ;; Unify localname.
177 (setq key (copy-sequence key)) 179 (setq key (copy-sequence key))
178 (aset key 3 (tramp-run-real-handler 'directory-file-name (list file))) 180 (aset key 3 file)
179 (tramp-message key 8 "%s" file) 181 (tramp-message key 8 "%s" file)
180 (remhash key tramp-cache-data)) 182 (remhash key tramp-cache-data))
181 183
@@ -188,7 +190,7 @@ Remove also properties of all files in subdirectories."
188 (truename (tramp-get-file-property key directory "file-truename" nil))) 190 (truename (tramp-get-file-property key directory "file-truename" nil)))
189 ;; Remove file properties of symlinks. 191 ;; Remove file properties of symlinks.
190 (when (and (stringp truename) 192 (when (and (stringp truename)
191 (not (string-equal directory truename))) 193 (not (string-equal directory (directory-file-name truename))))
192 (tramp-flush-directory-property key truename)) 194 (tramp-flush-directory-property key truename))
193 (tramp-message key 8 "%s" directory) 195 (tramp-message key 8 "%s" directory)
194 (maphash 196 (maphash