[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#20249: [PATCH] tramp: tramp-flush-directory-property loops infinitly
From: |
arakawa |
Subject: |
bug#20249: [PATCH] tramp: tramp-flush-directory-property loops infinitly. |
Date: |
Fri, 03 Apr 2015 09:31:21 +0900 (東京 (標準時)) |
Hi,
When tramp-flush-directory-property called with 'directory' which ends
in slash, directory-file-name removes the trailing slash but
'file-truename' operation doesn't necessarily remove it. In that case,
directory and truename always differ and
tramp-flush-directory-property called infinitely.
Best regards,
Koichi Arakawa
---
lisp/ChangeLog | 5 +++++
lisp/net/tramp-cache.el | 3 ++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 38e45d0..3f86a43 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2015-04-03 Koichi Arakawa <arakawa@pp.iij4u.or.jp>
+
+ * net/tramp-cache.el (tramp-flush-directory-property): Fix an
+ infinite loop when 'directory' ends in slash.
+
2015-04-02 Stefan Monnier <monnier@iro.umontreal.ca>
* abbrev.el (define-abbrev-table): Treat a non-string "docstring" as
diff --git a/lisp/net/tramp-cache.el b/lisp/net/tramp-cache.el
index 1e24ea5..a418eb5 100644
--- a/lisp/net/tramp-cache.el
+++ b/lisp/net/tramp-cache.el
@@ -188,7 +188,8 @@ 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 truename))
+ (not (string-equal (concat directory "/") truename)))
(tramp-flush-directory-property key truename))
(tramp-message key 8 "%s" directory)
(maphash
--
2.3.4
- bug#20249: [PATCH] tramp: tramp-flush-directory-property loops infinitly.,
arakawa <=