Overview
| Artifact ID: | e908b967ac0d3dbc1c6524b2f9d806e5a4b3e3ec |
|---|---|
| Ticket: | 1325803fffffffffffffffffffffffffffffffff
stat ino, nlink fields not set |
| User & Date: | nobody on 2005-10-13 13:29:41 |
Changes
- assignee changed to: "vincentdarley"
- cmimetype changed to: "text/plain"
- 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?
- foundin changed to: "obsolete: 8.5a4"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "nobody"
- subsystem changed to: "37. File System"
- title changed to: "stat ino, nlink fields not set"
- type changed to: "Bug"