Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com To: Cygwin List Subject: Re: ln and mkshortcut inconsistent in handling of .exe extension References: <5 DOT 1 DOT 0 DOT 14 DOT 0 DOT 20030929161708 DOT 028d6fe0 AT 127 DOT 0 DOT 0 DOT 1> <5 DOT 1 DOT 0 DOT 14 DOT 0 DOT 20030929161708 DOT 028d6fe0 AT 127 DOT 0 DOT 0 DOT 1> <5 DOT 1 DOT 0 DOT 14 DOT 0 DOT 20030930123307 DOT 0283c890 AT 127 DOT 0 DOT 0 DOT 1> From: Matt Swift Date: Tue, 30 Sep 2003 17:15:48 -0400 In-Reply-To: <5.1.0.14.0.20030930123307.0283c890@127.0.0.1> (Larry Hall's message of "Tue, 30 Sep 2003 12:42:40 -0400") Message-ID: User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Transfinites-MailScanner: clean X-Transfinites-MailScanner-SpamCheck: not spam, SpamAssassin (score=-4.9, required 5, BAYES_00 -4.90) Note-from-DJ: This may be spam >> "L" == Larry wrote: L> If you want/need a Windows-style shortcut with all the L> semantics that implies, use 'mkshortuct'. Is that the point L> you were missing? I am not asking for "all the semantics", just the ones that are documented (user guide 3.5) to exist for all Cygwin symlinks. I really don't think you understood my first report, and haven't realized it yet. I will make my point again in laborious detail. >> Second, I still don't understand why `ln' shouldn't behave the >> way I suggested: how is it better the way it is than if `ln -s' >> never created broken shortcuts L> The documentation I directed you to explains why 'ln -s' L> functions as it does and from that follows the need for L> 'mkshortcut'. 'ln -s' doesn't create 'broken shortcuts'. It L> creates symbolic links with UNIX semantics. That's the goal. That's only part of the stated goals of 'ln'. When CYGWIN contains "winsymlinks" (or more accurately, does not contain "nowinsymlinks" since "winsymlinks" is the stated default), symbolic links are supposed to function both as Cygwin symbolic link and as Windows Shortcuts. This is true most of the time, but it is NOT true when the symlink target's name given to ln is the name of an executable without its .exe extension. In this case, the file created by ln functions as a Cygwin symbolic link as expected but contrary to expectation does *not* function as a Windows Shortcut. The file created by 'ln', considered as a Windows Shortcut, is broken. My points are (1) the independent documentation of how .exe extensions are handled (user guide 3.4.3) and how symlinks are handled (3.5, 3.7.5) does not address their conjunction, a case which does not work as expected. The documentation on .exe extensions says that "install" and "strip" are the exceptions to transparent handling of .exe extensions. 'ln' should be included, and this case should be mentioned or cross-referenced in 3.5 and 3.7.5 as well. (2) instead of changing documentation per (1), it is reasonable to change the behavior of 'ln -s' so that the file it creates in the case under discussion is not only a Cygwin symbolic link but also a valid Windows Shortcut. NOT a full-fledged Windows Shortcut with icon and so on, of the kind mkshortcut creates, and the kind which you have repeatedly mistaken me to mean -- but simply a valid one, which points to the expected file, just like ALL the files that 'ln -s' creates EXCEPT in the particular case that the target's name is an executable without an .exe extension. The change I propose does not change how the files 'ln -s' creates function as Cygwin symlinks; it changes how a certain small anomalous category of files that 'ln -s' creates function as Windows Shortcuts, in a way that brings this case into conformity with the others it creates. When Cygwin follows a symlink, it examines the pathname that appears in the "Comment" field if you examine the file as a Windows Shortcut. When Windows follows a shortcut, it examines the contents of the "Target" field. 'ln' always puts the correct value in "Comment" and USUALLY puts the correct value in "Target", but not in the case under discussion. Wishing that 'ln' always put the right thing in both places is NOT wishing that ln were mkshortcut, it's wishing that ln behave consistently with all other Cygwin programs ("install" and "strip" being the documented exceptions), which are indifferent to whether .exe extensions are omitted or explicitly given. >> and 'ln' (hardlink) defaulted to a target of >> "foo.exe" when the supplied target "foo" doesn't exist? L> I'm inclined to agree on this. I think symmetry here would be a good thing. If you agree about that, I am very sure you will agree with my other point, once you undertsand it, because it does not even involve the small change to Cygwin semantics that the second point does (the second point involves a change to Cygwin semantics because you would get no error and a hardlink in certain cases where before you got an error; my first point suggests a change that has an effect from Windows only, not from Cygwin). -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/