GNU bug report logs -
#10489
24.0.92; dired-do-copy may create infinite directory hierarchy
Previous Next
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
[Message part 1 (text/plain, inline)]
Michael Albinus <michael.albinus <at> gmx.de> writes:
> Thierry Volpiatto <thierry.volpiatto <at> gmail.com> writes:
>
>> What about this?
>>
>> (defun file-name-equal-p (name1 name2 &optional dir)
>> (let* ((n1 (file-truename (expand-file-name name1 dir)))
>> (n2 (file-truename (expand-file-name name2 dir)))
>> (rhost1 (file-remote-p n1 'host))
>> (rhost2 (file-remote-p n2 'host))
>> (lname1 (file-remote-p n1 'localname))
>> (lname2 (file-remote-p n2 'localname))
>> (rem-n1 (if rhost1
>> (list (cons rhost1 lname1))
>> (list (cons (system-name) n1))))
>> (rem-n2 (if rhost2
>> (list (cons rhost2 lname2))
>> (list (cons (system-name) n2)))))
>> (loop for (x1 . y1) in rem-n1
>> for (x2 . y2) in rem-n2
>> thereis (and (equal x1 x2)
>> (equal y1 y2)))))
>
> Nope. User name and method also matter.
>
> "/ftp:host:/file" <> "/ssh:@host:/file"
>
> "/ftp:user1 <at> host:/file" <> "/ftp:user1 <at> host:/file"
I see.
> You shouldn't mess with remote files, really :-)
Indeed yes!
> That's what file name handlers are good for.
>
> Best regards, Michael.
I post here the last version of the patch I wrote today,
waiting something better to compare files.
it works and fix this bug in most use cases.
--
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997
[Singlepatch-r118414ToTip.patch (text/x-diff, attachment)]
[Message part 3 (application/pgp-signature, inline)]
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.