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, 24 Feb 2012 16:33:56 +0200

> From: Michael Albinus <michael.albinus@gmx.de>
> Cc: Eli Zaretskii <eliz@gnu.org>,  10489@debbugs.gnu.org
> Date: Fri, 24 Feb 2012 13:54:16 +0100
> 
> > +(defun files-equal-p (file1 file2)
> > +  "Return non-nil if FILE1 and FILE2 name the same file."
> > +  (and (equal (file-remote-p file1) (file-remote-p file2))
> > +       (equal (file-attributes (file-truename file1))
> > +              (file-attributes (file-truename file2)))))
> 
> This implementation requires, that inode number and filesystem device
> number are always unique. This is true for local files, if you run a
> Unix-like system. It is not guaranteed for remote files. And it is even
> not guaranted, if the local system is Windows: on mounted drives, the
> returned inode number is 0:

Mounted how (i.e. with what command or feature)?

Btw, this function is only interested in directories; do directories
also return a zero for inode in that case?

Anyway, I'd consider this a bug in `stat' implemented in w32.c, and
wouldn't bother the Lisp code with that.  The probability of 2
directories having _all_ of their attributes identical is very small,
even if we don't fix this in w32.c.  As an additional precaution, we
could compare their absolute file names as well.





reply via email to

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