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: Eli Zaretskii
Subject: bug#10489: 24.0.92; dired-do-copy may create infinite directory hierarchy
Date: Fri, 13 Jan 2012 14:41:30 +0200

> From: Juanma Barranquero <address@hidden>
> Date: Fri, 13 Jan 2012 13:01:49 +0100
> Cc: Thierry Volpiatto <address@hidden>, address@hidden
> 
> On Fri, Jan 13, 2012 at 11:31, Eli Zaretskii <address@hidden> wrote:
> 
> > Bottom line, I think you need:
> >
> >  . make both file names absolute by calling expand-file-name on each
> >
> >  . resolve links by calling file-truename on each (this will handle
> >    the 8+3 alias issue, as well as, AFAIK, the issue with links)
> >
> >  . compare case-insensitively on MS-Windows and MS-DOS
> 
> As this seems like a common occurrence, how comes that we don't have
> 
> (defun file-name-compare (name1 name2 &optional dir)
>   "..."
>   (let ((n1 (file-truename (expand-file-name name1 dir)))
>         (n2 (file-truename (expand-file-name name2 dir))))
>     (when (memq system-type '(ms-dos windows-nt))
>       (setq n1 (downcase n1)
>             n2 (downcase n2)))
>     (string= n1 n2)))
> 
> ?

Because in the past people objected to my saying that file names are
not strings.  Perhaps they will object now as well.






reply via email to

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