Subject: RE: bug#10489: 24.0.92; dired-do-copy may create infinite directory hierarchy

From: "Drew Adams" <[email-masked]>
Date: Fri, 13 Jan 2012 10:57:34 -0800

For one thing, you are accessing a remote file before testing whether it is
remote according to its name, which systematically costs you a remote access
(login etc.), perhaps uselessly. 

> 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)))