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


Message #294 received at 10489 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 10489 <at> debbugs.gnu.org
Subject: Re: bug#10489: 24.0.92;
	dired-do-copy may create infinite directory hierarchy
Date: Fri, 24 Feb 2012 16:00:34 +0100
Thierry Volpiatto <thierry.volpiatto <at> gmail.com> writes:

> Hi Michael,

Hi Thierry,

>> For both functions, please check for a file name handler, and call it if
>> available. It doesn't matter that they are not implemented yet; there is
>> the fallback to the native implementation in that case.
>>
>> With this check, I could start to implement the file name handlers in
>> Tramp's upstream repository.
> Do you mean something like in copy-directory:
>
> --8<---------------cut here---------------start------------->8---
>   (let ((handler (or (find-file-name-handler directory 'copy-directory)
> 		     (find-file-name-handler newname 'copy-directory))))
>     (if handler
> 	(funcall handler 'copy-directory directory newname keep-time parents)
> --8<---------------cut here---------------end--------------->8---

Yes. And in the example you have shown, please add COPY-CONTENTS to the
call of the handler, this is another error in `copy-directory'.

> So what do you propose for such a case?

Check, whether inode number and device number are trustworthy. A value
of 0 or '(0 0) isn't. Fall back to the hard way (compare file names via
string-equal).

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.