From: arakawa@pp.iij4u.or.jp
To: 20249@debbugs.gnu.org
Subject: bug#20249: [PATCH] tramp: tramp-flush-directory-property loops infinitly.
Date: Fri, 03 Apr 2015 09:31:21 +0900 (=?UTF-8?Q?=E6=9D=B1=E4=BA=AC?= (=?UTF-8?Q?=E6=A8=99=E6=BA=96=E6=99=82?=)) [thread overview]
Message-ID: <20150403.093121.1376099698840392615.arakawa@pp.iij4u.or.jp> (raw)
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
next reply other threads:[~2015-04-03 0:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-03 0:31 arakawa [this message]
2015-04-03 5:42 ` bug#20249: tramp: tramp-flush-directory-property loops infinitely Ivan Shmakov
2015-04-03 16:57 ` bug#20249: [PATCH] tramp: tramp-flush-directory-property loops infinitly Michael Albinus
2015-04-03 18:34 ` Koichi Arakawa
2015-04-03 19:25 ` Michael Albinus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150403.093121.1376099698840392615.arakawa@pp.iij4u.or.jp \
--to=arakawa@pp.iij4u.or.jp \
--cc=20249@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).