delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/09/30/17:20:44

X-Recipient: archive-cygwin AT delorie DOT 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 AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT 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 AT ptc DOT 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 AT cygwin DOT com>
Subject: Re: Native symbolic links to non-existent targets (possible bug?)
References: <542A219C DOT 6070402 AT ptc DOT com>
In-Reply-To: <542A219C.6070402@ptc.com>
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019