bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#10489: 24.0.92; dired-do-copy may create infinite directory hierarch


From: Thierry Volpiatto
Subject: bug#10489: 24.0.92; dired-do-copy may create infinite directory hierarchy
Date: Mon, 16 Jan 2012 09:58:10 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

Michael Albinus <address@hidden> writes:

> Thierry Volpiatto <address@hidden> 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))))))

So, any objections to apply my patch to trunk with these changes?

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]