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

From: "Drew Adams" <drew.adams <at> oracle.com>
To: <michael.albinus <at> gmx.de>
Cc: 10489 <at> debbugs.gnu.org
Subject: RE: bug#10489: 24.0.92;
	dired-do-copy may create infinite directory hierarchy
Date: Sun, 15 Jan 2012 10:42:45 -0800
> (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."
>   (let* ((remote1  (bmkp-file-remote-p file1))
>          (remote2  (bmkp-file-remote-p file2))
>          (ignore-case-p
>           (and (not remote1) (not remote2)
>                (eval (car (get 'read-file-name-completion-ignore-case
>                                'standard-value))))))
>     (and (equal remote1 remote2)
>          (compare-strings (file-truename (expand-file-name file1))
>                           (file-truename (expand-file-name file2))
>                           ignore-case-p))))

Sorry, that `compare-strings' sexp is obviously not right.  The last 3 lines
should be this:

(and (equal remote1 remote2)
     (let ((ft1  (file-truename (expand-file-name file1)))
           (ft2  (file-truename (expand-file-name file2))))
       (compare-strings ft1 0 (length ft1) ft2 0 (length ft2)
                        ignore-case-p)))))





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.