Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <549191FE7B71D311BC5900104B292132010E4F8C@kirk.takefive.co.at> From: Martin Oberhuber To: "'cygwin AT cygwin DOT com'" Subject: Problem with Windows .lnk files treated as Symlinks Date: Thu, 3 May 2001 15:27:37 +0200 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" Hello, since cygwin-1.3, Windows *.lnk files are treated as UNIX symbolic links by default. We rean into a problem where we wanted to use the "cp" command to copy a Windows *.lnk shortcut to a new place. This worked alright with previous cygwin versions, but with 1.3, the file referenced was copied instead of the *.lnk file. One problem with this behavour is that additional attributes of the *.lnk file (like parameters passed to the program referenced, or an icon associated) are not copied in that case. Looking at options of the CYGWIN environment variable as well as options of the "cp" command, I found NO WAY of copying the *.lnk file instead of the file referenced! Even "cp -d", which is documented to preserve symbolic links (and works like that on Linux) did not work. Setting CYGWIN=nowinsymlinks only affects link creation, but not link interpretation by "cp". Taking into account that Windows Shortcuts are more than UNIX symbolic links, and that thus a one-to-one mapping is always problematic, I would suggest the following to preserve a clean environment as well as backward compatibility: 1.) Only *.lnk files created by Cygwin (with the special cygwin header), should be treated as symbolic links when they are read. If the *.lnk file is not a "cygwin *.lnk" with its special header, it should be treated as a plain file. If this is not observed, important information may be lost (also think about programs like tar that cannot reproduce an exact image of the original file system if *.lnk files are not completely copied). 2.) If CYGWIN=nowinsymlinks is set, not only symbolic link creation but also symbolic link interpretation should be "classical", i.e. *.lnk files are treated as files. Please keep me informed on your plans regarding this issue. Thanks in advance, Martin Oberhuber -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple