GNU bug report logs - #10489
24.0.92; dired-do-copy may create infinite directory hierarchy

Previous Next

Package: emacs;

Reported by: michael_heerdegen <at> web.de

Date: Thu, 12 Jan 2012 19:36:01 UTC

Severity: important

Tags: patch

Merged with 11130

Found in version 24.0.92

Done: Chong Yidong <cyd <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 10489 <at> debbugs.gnu.org, Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
Subject: bug#10489: 24.0.92; dired-do-copy may create infinite directory hierarchy
Date: Mon, 16 Jan 2012 15:13:11 +0100
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>>> (string= (directory-file-name (file-truename (expand-file-name file1)))
>>> (directory-file-name (file-truename (expand-file-name file2))))))
>
>> So, any objections to apply my patch to trunk with these changes?
>
> Couldn't we use something closer to what we want to ideally use?
> E.g. (equal (file-attributes file1) (file-attributes file2))?

We need at least the `file-truename' call. 

(equal (file-attributes (file-truename (expand-file-name file1)))
       (file-attributes (file-truename (expand-file-name file2))))))

I don't know, whether `file-truename' calls `expand-file-name'
internally. `tramp-sh-handle-file-truename' does. Maybe we don't need it.

We could also add already the check for the file name handler. When
there is no file name handler (Emacs 24.1), it doesn't hurt. Later on,
we don't need to touch the fucntion, again. And I'll start to add the
file name handler upstream Tramp, once the function is available in
Emacs 24.1.

>         Stefan

Best regards, Michael.




This bug report was last modified 13 years and 58 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.