GNU bug report logs -
#10489
24.0.92; dired-do-copy may create infinite directory hierarchy
Previous Next
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 #297 received at 10489 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
>> 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)?
Don't know, somebody has added "network drives" to my login. All I can
say is
--8<---------------cut here---------------start------------->8---
U:\>net use
New connections will be remembered.
Status Local Remote Network
-------------------------------------------------------------------------------
Disconnected R: \\ASLSDA0\ZENTRAL Microsoft Windows Network
OK U: \\DESTGSFILN2\lb01177$ Microsoft Windows Network
OK Y: \\sambager1\albinus Microsoft Windows Network
The command completed successfully.
--8<---------------cut here---------------end--------------->8---
> Btw, this function is only interested in directories; do directories
> also return a zero for inode in that case?
We are speaking about (defun files-equal-p (file1 file2) ...
This is also for files.
However, there is the same problem with directories:
(file-attributes "y:/")
=> (t 1 101567 513 (0 0) (0 0) (0 0) 0 "drwxrwxrwx" nil 0 (47631 . 5881))
> Anyway, I'd consider this a bug in `stat' implemented in w32.c, and
> wouldn't bother the Lisp code with that.
OK, that would be fine. Do we know, that device number and inode number
are trustworthy on all systems Emacs runs? When I've started with Tramp
years ago, it was the first lesson I've learnt, that we shouldn't use
inode and device numbers for serious things. And I have the impression,
both values aren't used heavily (this was a result of code inspection
some years ago, it might have changed).
> The probability of 2 directories having _all_ of their attributes
> identical is very small, even if we don't fix this in w32.c.
We are also speaking about files. And then it is a problem. Example:
On UNIX:
# cp -p ~/.emacs ~/to-be-tested
On Windows (y: is my UNIX home directory):
(equal (file-attributes "y:/.emacs") (file-attributes "y:/to-be-tested"))
=> t
Best regards, Michael.
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.