X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:message-id:date:from:mime-version:to:subject
	:references:in-reply-to:content-type:content-transfer-encoding;
	 q=dns; s=default; b=s5kaxVNtj87v05iR9pcfXb50DcEJRNBcW/bkiLK+MQo
	U26TweAWqAPlEMJK1zCkovg78dk3jPMcuEEJ+7IHFLkTPs50YYz8+LsNYE7JU6Ga
	gnWoKMMq8Q0/EFLiowniRv8inBouy96PHKp48q0Ev+eMzCE0eXGH5mS1t7AI+QT0
	=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:message-id:date:from:mime-version:to:subject
	:references:in-reply-to:content-type:content-transfer-encoding;
	 s=default; bh=vNgARkLc1PpZL0xCUGmwvMmSPeI=; b=vqMOMoC5NfpqjS2KQ
	SuUhp2fI1q+7abid670Yr/M6KFibLaLVsl9daZzatHgRrarFqdKur/wTQHgQYog2
	cKO3JrQf9Sndi7Cg6OjWnQA5BnpVexs4TXYNU2yMFB/8eADYXCdRk9IJA9NscMbn
	pdvS0ODehHIsNwyyxaKc29aurQ=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-0.6 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2
X-HELO: mx2.ptc.com
Message-ID: <542B1E97.7020403@ptc.com>
Date: Tue, 30 Sep 2014 16:20:23 -0500
From: Brian Ericson <bericson@ptc.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1
MIME-Version: 1.0
To: <cygwin@cygwin.com>
Subject: Re: Native symbolic links to non-existent targets (possible bug?)
References: <542A219C.6070402@ptc.com>
In-Reply-To: <542A219C.6070402@ptc.com>
Content-Type: text/plain; charset="utf-8"; format=flowed
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes

Looking at the source, I may be able to address my own questions/points.

On 09/29/2014 10:21 PM, Brian Ericson wrote:
> Cygwin appears to ignore "winsymlinks:native" when asked to create a
> symbolic link to a non-existent target, reverting to its "magic header"
> approach.
This is true...
> Shouldn't Cygwin honor "winsymlinks:native" even with the target does
> not exist?
According to the following comment at line 1646 of path.cc (see 
https://cygwin.com/viewvc/src/winsup/cygwin/path.cc?view=markup#l1646):

   /* If the symlink target doesn't exist, don't create native symlink.
      Otherwise the directory flag in the symlink is potentially wrong
      when the target comes into existence, and native tools will fail.
      This is so screwball. This is no problem on AFS, fortunately. */

no, it can't/shouldn't honor the "native" designation when the target 
doesn't exist, because it can't be assume the to-be-born target will be 
born as a file or a directory, and this matters to Windows.

I wonder...  Is there a way to determine in Cygwin (in the (bash) shell) 
if the symbolic link is native or not?

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

