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 #184 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#10489: 24.0.92;
	dired-do-copy may create infinite directory hierarchy
Date: Sun, 15 Jan 2012 22:01:45 +0100
Michael Albinus <michael.albinus <at> gmx.de> writes:

> Thierry Volpiatto <thierry.volpiatto <at> gmail.com> writes:
>
>> IMHO we should fix this bug for most use cases with a compare function
>> maybe not perfect in many points but ok for most basic usages.
>> The function shown by Drew and I put in last patch as you said isn't
>> sufficient and fail in many cases even on local filesystem:
>>
>> (defun bmkp-same-file-p (file1 file2)
>>   "Return non-nil if FILE1 and FILE2 name the same file.
>> If either name is not absolute, then it is expanded relative to
>> `default-directory' for the test."
>>   (and (equal (file-remote-p file1) (file-remote-p file2))
>>        (string= (file-truename (expand-file-name file1))
>>                 (file-truename (expand-file-name file2)))))
>>
>> (bmkp-same-file-p "~/Test" "/home/thierry/Test/") => nil
>
> So it must be 
>
>        (string= (directory-file-name (file-truename (expand-file-name file1)))
>                 (directory-file-name (file-truename (expand-file-name file2))))))

Of course, thanks.

-- 
  Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 





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.