This is the mail archive of the
cygwin-patches@cygwin.com
mailing list for the Cygwin project.
Re: link(2) fails on mounted network shares
- From: Christopher Faylor <cgf-no-personal-reply-please at cygwin dot com>
- To: cygwin-patches at cygwin dot com
- Date: Mon, 30 May 2005 20:18:04 -0400
- Subject: Re: link(2) fails on mounted network shares
- References: <8768.1117496344@www52.gmx.net>
- Reply-to: cygwin-patches at cygwin dot com
On Tue, May 31, 2005 at 01:39:04AM +0200, Martin Koeppe wrote:
>Hello,
>
>I recently found out that you cannot create hardlinks
>on mounted network shares with cygwin
>(error: No such file or directory),
>but you can do it with the ln.exe from Interix.
>
>So I looked at it and found that the Windows API
>function CreateHardLink() causes the trouble, it apparently
>only works for local drives.
>
>There is another API function, however, which creates hardlinks
>correctly on local and network drives (tested on Win2003 shares
>and Samba shares):
>
>MoveFileEx() with parameter:
>#define MOVEFILE_CREATE_HARDLINK 16
I've found two references to this in MSDN. Both say:
MOVEFILE_CREATE_HARDLINK Reserved for future use.
That doesn't sound too encouraging as far as compatibility is concerned.
cgf