[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: file-attributes returns negative integer for inode value
From: |
Eli Zaretskii |
Subject: |
Re: file-attributes returns negative integer for inode value |
Date: |
Mon, 03 Mar 2008 06:25:42 +0200 |
> From: "Drew Adams" <address@hidden>
> Date: Sun, 2 Mar 2008 16:12:59 -0800
> Cc: address@hidden
>
> > > M-x (file-attributes "c:/drews-lisp-20/Screenshots") gives:
> > >
> > > (t 1 5 5 (18378 24192) (18123 40338) (18123 40337) 0
> > > "drwxrwxrwx" nil -3082 240391127)
> > >
> > > The inode value here is -3082.
> >
> > And what's the real ino?
>
> Dunno. How do I tell that on Windows?
One way is to run "ls -i" on that file. You will need ls.exe from the
GnuWin32 port of Coreutils. Note that the w32 emulation of `stat' in
the Windows port of Emacs does not use the real inode value verbatim,
it mangles it with bit-shift and XOR operations. This is because the
inode is a 48-bit value, while sys/stat.h on Windows says the inode is
a 16-bit field.
> But I doubt you need that info to discover the problem, anyway. I suspect it
> is a problem on Windows in the code that detects a too-large integer and
> returns a cons in its place.
The problem is a little bit different: obviously, a 16-bit value
cannot overflow ab EMACS_INT. The problem is we don't keep the value
positive. I will work on this soon.