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

From: Juanma Barranquero <lekktu <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 10489 <at> debbugs.gnu.org, Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
Subject: Re: bug#10489: 24.0.92;
	dired-do-copy may create infinite directory hierarchy
Date: Fri, 13 Jan 2012 13:01:49 +0100
On Fri, Jan 13, 2012 at 11:31, Eli Zaretskii <eliz <at> gnu.org> 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)))

?

    Juanma




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.