GNU bug report logs -
#20249
[PATCH] tramp: tramp-flush-directory-property loops infinitly.
Previous Next
Reported by: arakawa <at> pp.iij4u.or.jp
Date: Fri, 3 Apr 2015 01:53:02 UTC
Severity: normal
Tags: patch
Fixed in version 25.1
Done: Michael Albinus <michael.albinus <at> gmx.de>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 20249 in the body.
You can then email your comments to 20249 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#20249
; Package
emacs
.
(Fri, 03 Apr 2015 01:53:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
arakawa <at> pp.iij4u.or.jp
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 03 Apr 2015 01:53:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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 <at> 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 <at> 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
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#20249
; Package
emacs
.
(Fri, 03 Apr 2015 05:43:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 20249 <at> debbugs.gnu.org (full text, mbox):
>>>>> Koichi Arakawa <arakawa <at> pp.iij4u.or.jp> writes:
[…]
> @@ -188,7 +188,8 @@ defun tramp-flush-directory-property (key directory)
> (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
I believe the above should use file-name-as-directory instead of
a plain concat.
--
FSF associate member #7257 http://boycottsystemd.org/ … 3013 B6A0 230E 334A
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#20249
; Package
emacs
.
(Fri, 03 Apr 2015 16:58:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 20249 <at> debbugs.gnu.org (full text, mbox):
arakawa <at> pp.iij4u.or.jp writes:
> Hi,
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.
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?
> Best regards,
> Koichi Arakawa
Best regards, Michael.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#20249
; Package
emacs
.
(Fri, 03 Apr 2015 18:37:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 20249 <at> debbugs.gnu.org (full text, mbox):
Hi Michael,
> 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.
--
Koichi Arakawa
Reply sent
to
Michael Albinus <michael.albinus <at> gmx.de>
:
You have taken responsibility.
(Fri, 03 Apr 2015 19:26:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
arakawa <at> pp.iij4u.or.jp
:
bug acknowledged by developer.
(Fri, 03 Apr 2015 19:26:02 GMT)
Full text and
rfc822 format available.
Message #19 received at 20249-done <at> debbugs.gnu.org (full text, mbox):
Version: 25.1
"Koichi Arakawa" <arakawa <at> pp.iij4u.or.jp> 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.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 02 May 2015 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 10 years and 110 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.