This is the mail archive of the
mailing list for the Cygwin project.
Re: `CYGWIN=winsymlinks:nativestrict`, `ln -s target link` fails if target doesn't exist
- From: Andrey Repin <anrdaemon at yandex dot ru>
- To: Eric Blake <eblake at redhat dot com>, cygwin at cygwin dot com
- Date: Fri, 29 Apr 2016 07:41:13 +0300
- Subject: Re: `CYGWIN=winsymlinks:nativestrict`, `ln -s target link` fails if target doesn't exist
- Authentication-results: sourceware.org; auth=none
- References: <CAPTiy3NUXprQL6V0+Njc2L7XfhpqtC7oWFwNMhOEFZ2OZmddoQ at mail dot gmail dot com> <1606116423 dot 20160429020650 at yandex dot ru> <5722A131 dot 6010001 at redhat dot com>
- Reply-to: cygwin at cygwin dot com
Greetings, Eric Blake!
> On 04/28/2016 05:06 PM, Andrey Repin wrote:
>>> Bottom line, I think the native symlink creation code should be
>>> checked and a possibility should be added to create links to
>>> non-existent targets, rather than the current behavior of failing.
>> This is actually an arguable behavior, even in Linux. I can imagine the
>> behavior is "undefined" in such a case.
> POSIX says a symlink to a missing target is perfectly well-defined (you
> can't stat() through it, but you can readlink() it). But Windows native
> symlinks can't do that. So the problems you are encountering all stem
> from the fact that you are trying to make Windows do something it can't.
My initial reaction was that, too, but I tried mklink (CMD internal command)
mklink x y
and it created the symlink in the empty directory just fine.
With best regards,
Friday, April 29, 2016 07:40:02
Sorry for my terrible english...
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple