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:from:reply-to:to:subject:message-id:date
	:mime-version:content-type:content-transfer-encoding; q=dns; s=
	default; b=PwNVYvButRuR6pBk5tOy8y8p4JS1MFiUXrbNz7yJ4ziYQSasur1tU
	ZxmCgn3vjrxVDI360qQ/BhkI/36KxwxXhKNKoqkv9JnKd3BnlB9xnCzPw7XjBo/k
	C3dVHwTAIduU/hSngQT0l0uWNpWf2ZbmwSE2gtPjUyPKZaUbI8aGgU=
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:from:reply-to:to:subject:message-id:date
	:mime-version:content-type:content-transfer-encoding; s=default;
	 bh=kWEFFFs5TuUkiczLNWQ4s+tTbl8=; b=sYz0BcSHbcTOjB6EqmDU+gYLNA2x
	ZoJ2m51DBt70xWeIhFJj5ZtjsIF9MqU+O+7+k346N0equOCdfo8U1r4Ol3iVL8NR
	dqlMDatGpet26QLVZNcgkeh/EMPQ3yhGRH8fArQ0G1f4q8JbUj1U/AW0gKRc+7qB
	ScOc56F11xKS/m0=
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.7 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,FREEMAIL_REPLYTO,KB_WAM_FROM_NAME_SINGLEWORD,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.2 spammy=cp, Hx-languages-length:1115
X-HELO: mail-pg0-f41.google.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;        d=1e100.net; s=20161025;        h=x-gm-message-state:from:reply-to:to:subject:message-id:date         :user-agent:mime-version:content-transfer-encoding;        bh=H4lPQO5BA4siTQBEhRY8cCW8aiZqS+BhWcuO1mHVQ6E=;        b=h7l+I+788EFZaG2Nrd3ey445znkl/6Enpbd1qs1yMLpUKpzlj01/dW2FA80w0sbh2f         6rxEw7zbp7ggyaV4JqJFfy7IZJhVit5AaKzO8M0DeKqLJUSr5Hnngwsmq/cWLJugG9O2         sRm4TLsSAPa0gYIEEUyLuLX+5F/tiXyz92Hzw4r6OungRWa40FD5G/p553hxVJGVffgx         QcksmncIkF9I2GTyDBKaOusqBQnbhFFr+xTL4bBjlk0S+ZS+OYueLse4dTK+IZHqHrfR         dAchaiHjFHXdcCnH/R+1i/BIdBfwU3R5FfAa00JUS20sPxpmGj3EhmyQcS6MfIA+C7Mf         AL4g==
X-Gm-Message-State: AJaThX7E4/ga1eMk8EUEF1BfV1vPXX5LzVba4i9d4P95/xlPbUBRmFxR	DyCENRmzs5Q0UuRi7+I69WZsmXu9
X-Google-Smtp-Source: AGs4zMZQm3vHvf/X8uZV0riJYZwDTBtkWixabQolT7Fbw5V/NUn+j3NCA2HT7xBPOJNvLR41b0JvHw==
X-Received: by 10.84.164.231 with SMTP id l36mr1432373plg.179.1510833337347;        Thu, 16 Nov 2017 03:55:37 -0800 (PST)
From: "Matt D." <codespunk@gmail.com>
X-Google-Original-From: "Matt D." <codespunk+cygwin@gmail.com>
Reply-To: codespunk+cygwin@gmail.com
To: cygwin@cygwin.com
Subject: Broken junctions and symlinks halt recursive cp and rsync operations?
Message-ID: <5A0D7CBA.5010406@gmail.com>
Date: Thu, 16 Nov 2017 06:55:38 -0500
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit

I can make a directory 'a/' and a symlink 'b' of 'b -> a' and copy 'b' 
to 'c' which also points to 'a':

$mkdir a
$CYGWIN= ln -s a b
$CYGWIN= cp -a b c

On Linux if I break the link as such:

$rm -r a c

I can still copy the broken link:

$cp -a b c

But on Cygwin I cannot do this for native junctions and native symbolic 
links (note that Cygwin symlinks work fine in this scenario). This issue 
breaks both cp and rsync when working with either form of native links.

$rm -r a b c

$mkdir a
$CYGWIN=winsymlinks:nativestrict ln -s a b
$rm -r a

See here:

$CYGWIN=winsymlinks:nativestrict cp -a b c
cp: cannot create symbolic link 'c': No such file or directory

And:

$rsync -a b c
rsync: symlink "/c/test/c" -> "a" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) 
(code 23) at main.c(1196) [sender=3.1.2]

Is there a way to recover from this? It breaks copy operations of 
directories which contain broken symlinks where I would expect the 
broken link to be copied as-is.


Matt D.

--
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

