diff options
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/net/tramp-cache.el | 12 |
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 @@ | |||
| 1 | 2015-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 | |||
| 1 | 2015-04-03 Nicolas Richard <theonewiththeevillook@yahoo.fr> | 7 | 2015-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 |