This is the mail archive of the
mailing list for the Cygwin project.
Hard links in tar, not untaring as expected
- From: "Sally, Gene" <Gene dot Sally at timesys dot com>
- To: <cygwin at cygwin dot com>
- Date: Mon, 22 Jan 2007 13:50:03 -0500
- Subject: Hard links in tar, not untaring as expected
I'm wrestling with an interesting problem.
Considering a tar file with the following contents (tar tvzf file.tgz)
drwxr-xr-x UserName GroupName 0 2007-01-18 16:35:22 test/
-rw-r--r-- UserName GroupName 9 2007-01-18 16:35:22 test/hardlink
-rw-r--r-- UserName GroupName 0 2007-01-18 16:35:22 test/orig-file link
When this file untars, only one of the files is created. I found this
curious, so when I used strace, I saw the following:
128 103145 [main] tar 184 unlink: _unlink (c:\home\test\hardlink)
335 103480 [main] tar 184 unlink: 1 = CloseHandle (0x2AC)
132 103612 [main] tar 184 unlink: CreateFile
82 103694 [main] tar 184 unlink: 0 = unlink (test/hardlink)
The file is created like this:
83 107926 [main] tar 184 fhandler_base::open: 0 = NtCreateFile
(0x2AC, 40100080, c:\home\test\hardlink, io, NULL, 80, 7, 2, 20, NULL,
I've tried untaring the file on another Win2K SP4 host, and it works.
Both are using the same Cygwin
App version: 1005.22, api: 0.156
DLL version: 1005.23, api: 0.156
DLL build: 2006-12-19 10:52
Obviously, there's something different, but I can't figure out what that
is. Is anyone aware of some subtle changes in the win API that could
cause this problem? Maybe there some permission settings that could
cause this problem?
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html