--- Begin Message ---
Subject: |
[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 <address@hidden>
+
+ * net/tramp-cache.el (tramp-flush-directory-property): Fix an
+ infinite loop when 'directory' ends in slash.
+
2015-04-02 Stefan Monnier <address@hidden>
* 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
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#20249: [PATCH] tramp: tramp-flush-directory-property loops infinitly. |
Date: |
Fri, 03 Apr 2015 21:25:36 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
Version: 25.1
"Koichi Arakawa" <address@hidden> writes:
> Hi Michael,
Hi,
>> Thanks for the report. tramp-flush-file-property seems also be affected
>> (but it doesn't recurse indefinitely). I have committed a patch to the
>> master branch which shall fix all the cases. Could you, please, test it?
>
> Sure. I have tested it and it works fine. Thank you.
Thanks for testing. I'm closing the bug.
Best regards, Michael.
--- End Message ---