This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
link() is copying on NTFS
- To: gnu-win32 at cygnus dot com
- Subject: link() is copying on NTFS
- From: Eric Mills <eric at osiris dot com dot au>
- Date: Fri, 5 Sep 97 13:30:52 est
On NT4.0sp3 on NTFS filesystem running b18
I MUST be missing some fundamental configuration option but...
It appears as if the link() system call is actually copying the file!
While one has to do that on FAT - NTFS does support multiple names for a
file. This trivial program:
#include <sys/types.h>
#include <sys/stat.h>
main(ac, av)
int ac;
char **av;
{
struct stat sb;
if (link(av[1], av[2]) == 0
&& stat(av[2], &sb) == 0) {
printf("Links = %d\n", sb.st_nlink);
return 0;
}
return 1;
}
prints 1 on gnu-win32 and 2 on UNIX (provided the target does not exist! etc
etc) The new file on gnu-win32 is really different....
The "ln" command is consequently broken as well.
Thanks, Eric Mills.
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".