From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22905 invoked by alias); 3 Nov 2015 13:20:56 -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 22896 invoked by uid 89); 3 Nov 2015 13:20:55 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.4 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 X-HELO: calimero.vinschen.de Received: from aquarius.hirmke.de (HELO calimero.vinschen.de) (217.91.18.234) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 03 Nov 2015 13:20:55 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id DB52AA805F0; Tue, 3 Nov 2015 14:20:52 +0100 (CET) Date: Tue, 03 Nov 2015 13:20:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: Using cp converts windows junctions to a cywin symlink Message-ID: <20151103132052.GG18567@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="/Zw+/jwnNHcBRYYu" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-SW-Source: 2015-11/txt/msg00079.txt.bz2 --/Zw+/jwnNHcBRYYu Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 1487 On Nov 2 13:57, Adrian H wrote: > I was copying a directory of files, some of which were windows junctions. > These got converted to a cygwin symlink. Although I am impressed that th= ere > are such a thing for those OSs/drives that do not support such things, fo= r those > that do, I think it would be good to keep the copy a junction. Otherwise, > things can get messy. >=20 > Can this be corrected? No. The actual copy is done by the application, not by Cygwin. The application (cp, rsync, whatnot) is a POSIX application which has no notion of "junctions". From the view of the POSIX application, directory junctions are symlinks. So the copying application will call the symlink or symlinkat function. This call has no idea that the to-be-created symlink is a copy of a directory juntion. After all, there 's no connection between the stat call on the source and the symlink call on the destination. To alleviate this partially, you can copy with the environment variable CYGWIN set to "winsymlinks:native" or "winsymlinks:nativestrict". This will create native symlinks, not directory junctions, so it requires the "Create symbolic links" privilege set for the current user, but it's better than nothing. From a consumer perspective, a directory junction and a symlink to a directory are not really different. Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --/Zw+/jwnNHcBRYYu Content-Type: application/pgp-signature Content-length: 819 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJWOLS0AAoJEPU2Bp2uRE+ger4QAIz9U7dlPX7rkbo+gY4P1Kot 78CeRK58Yz+Q8n56SKqns53oCIlBTl2xZfB1jbN4ZMT7irBZWoZ+3RB0MCmjgW8i fdXr7VtSg6GkCdP7sWAGYY5UOxAJngmcG52dBNlk3O/1H7KwnhfsTBUC5LuexLYE kGFMUv4m28WgbdjGWUuNEIBjUbK0tXepXviY7O0vN+6jxwzOiFIWlyioCS6eJPHv m1kim9vizKmWnQp7dWHlLP8C8omkwmwW/s9+vRwxQsBVtBWVx30OuIF6C1BznlLC dBLKcGas5rhnKJ1VOzOQBk5wOeKP4QEkla1BkyPqDFWDdDB/Tq1wyq84584Sx/qx Lk9ccEqYjRz7QwpsnU947ePfUnkTXqzSljM5psCmUC7yPqUk2YNYY/dvga2Bmf5H xNln+CVB0HTENWCBHd1xkzRCboujxD6ulmZvTIfYABJCk3Rd7tZy1R8q3s6DV3Yv iL9fZqoFyjWQ72/RGPHwXIUsCGJehrjUIB09jSSHPJXRKcYeXsD/Lfgb1iGEVxou PlXqyopko44MEFqm3gJTdp1BpBxoaGefLMi0r2QUV+4otKFVRxDR+mqlByPQ/2mu HAPa7I2fgvm0unwwuK/MIWiYvopTLWOwWVdQet15uBQmDHLXUBH4nDjj41rqBV7R uVZeB6TAZzG6HXwDEE82 =sznM -----END PGP SIGNATURE----- --/Zw+/jwnNHcBRYYu--