From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 116386 invoked by alias); 29 Apr 2016 12:03:14 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 116351 invoked by uid 89); 29 Apr 2016 12:03:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=H*Ad:D*se, H*MI:sk:WsX-A@m, H*i:sk:WsX-A@m, H*f:sk:WsX-A@m X-HELO: mail.lysator.liu.se Received: from mail.lysator.liu.se (HELO mail.lysator.liu.se) (130.236.254.3) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 29 Apr 2016 12:03:06 +0000 Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id 26CCA40034 for ; Fri, 29 Apr 2016 14:03:02 +0200 (CEST) Received: from [192.168.0.125] (217-210-101-82-no95.business.telia.com [217.210.101.82]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTPSA id DCE204002D for ; Fri, 29 Apr 2016 14:03:01 +0200 (CEST) Subject: Re: `CYGWIN=winsymlinks:nativestrict`, `ln -s target link` fails if target doesn't exist To: cygwin@cygwin.com References: <1606116423.20160429020650@yandex.ru> From: Peter Rosin Message-ID: <5580e7fc-e227-d9d8-a186-b58c8b17cfa3@lysator.liu.se> Date: Fri, 29 Apr 2016 12:15:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2016-04/txt/msg00643.txt.bz2 On 2016-04-29 13:34, Gene Pavlovsky wrote: >>> 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. > > This is my point exactly. Windows dangling symlinks can be created as > easily as in UNIX. > At least this is the case on my Win7 x64. No, it can't. c:\>mklink a b c:\>mkdir b c:\>cd b c:\b>cd .. c:\>cd a The directory name is invalid c:\>rmdir b c:\>echo hello > b c:\>type a hello It only works for dangling links to files. Not good enough. Cheers, Peter -- 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