Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: e908b967ac0d3dbc1c6524b2f9d806e5a4b3e3ec
Ticket: 1325803fffffffffffffffffffffffffffffffff
stat ino, nlink fields not set
User & Date: nobody on 2005-10-13 13:29:41
Changes

  1. assignee changed to: "vincentdarley"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    When support for file links was added to Tcl, the
    'stat' command was not updated on Windows to add
    unix-like support for the ino and nlink fields.
    
    Here's a relevant email transcript:
    
     Jeff Hobbs 
    to Oscar, me
     More options  Sep 28
    Hi Oscar,
    
    You may well be right that the 'file stat' stuff was not
    updated to properly reflect the status of hard links.  I
    am cc'ing Vince Darley, author of that TIP to comment on
    whether that was an oversight or intentional.
    
    Regards,
    
    Jeff
    
    Oscar Bonilla wrote:
    > On Sep 27, 2005, at 6:16 PM, Jeff Hobbs wrote:
    >
    > > Oscar Bonilla wrote:
    > >
    > >> I was talking with Larry about hard links on
    Windows and how we don't
    > >> support them even though NTFS supports them, and
    he brought up that
    > >> ActivePython supports them.
    > >>
    > >> I was looking at the ftp site of activestate, and
    it seems the newest
    > >> source is for version 2.3.1 from Nov 2003. Do you
    know where I could
    > >> get the latest source?
    > >>
    > >> Or better yet, do you know how they implemented
    the stat(2) syscall
    > >> (in terms of which win32 APIs)? Does Tcl handle this?
    > >>
    > >
    > > Tcl supports hard links as well:
    > >
    > >
    http://aspn.activestate.com/ASPN/docs/ActiveTcl/tcl/TclCmd/
    > > file.htm#M20
    >
    > Well, unless I'm reading
    >
    http://cvs.sourceforge.net/viewcvs.py/tcl/tcl/win/tclWinFile.c?
    > rev=1.77&view=auto
    > incorrectly, 'file stat' always returns st_ino = 0
    and st_nlink = 1
    > on Windows.
    >
    > So even though you can create hard links, you can't
    tell if a file is
    > hard linked to another or if it has more than one
    link. Right?
    >
    > Cygwin seems to get away with using nFileIndexHigh |
    nFileIndexLow
    > for the inode and you can get the real hard link
    count from
    > GetFileInformationByHandle() in the nNumberOfLinks field.
    >
    > > You would get the latest python from SourceForge.
    >
    > I couldn't find the hard link stuff there... Tcl
    source seems more
    > organized ;-)
    >
    > Regards,
    >
    > -Oscar
    
    
      ReplyReply to allForwardInvite Jeff to Gmail
    
    
    Vince Darley 
    to Jeff, Oscar
     More options  Sep 28
    Oscar,
    
    Indeed 'ino' and 'nlink' were not updated when I added
    support for
    hard links to Tcl. This was simply an oversight due to
    my lack of use
    of these fields (and it would seem most people's lack
    of use of them,
    given yours is the first bug report on this!). It would
    be good to
    make these as similar as possible to their Unix
    interpretations.
    
    Can you perhaps provide a patch and/or new tests for
    the test suite?
    
    
    
  4. foundin changed to: "obsolete: 8.5a4"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "37. File System"
  10. title changed to: "stat ino, nlink fields not set"
  11. type changed to: "Bug"