delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> |
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 AT cygwin DOT com |
Subject: | ln and mkshortcut inconsistent in handling of .exe extension |
From: | Matt Swift <swift AT alum DOT mit DOT edu> |
Date: | Mon, 29 Sep 2003 14:23:23 -0400 |
Message-ID: | <m2zngnv4h0.fsf@beth.swift.xxx> |
User-Agent: | Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux) |
MIME-Version: | 1.0 |
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 |
The following shell transcript demonstrates that `ln' does not handle the .exe extension gracefully, like mkshortcut does. I believe graceful behavior would require the following changes: 1) `ln' would not give the two errors below when trying to create "hardlink-to-base" and "hardlink-to-base.exe": the target ("program") should silently have the .exe extension added. I do not know whether there should be a warning in this case, or whether the .exe extension should be added to the link-name, perhaps with a warning. 2) The files "symlink-to-base" "symlink-to-base.exe" should have the .exe extension silently added to the Windows shortcut target: at present, the files are not valid Windows shortcuts (they appear to Windows Explorer as a shortcut, but have an empty "Target" which can not be altered in the usual way; the Comment field is correct). This behavior would match `mkshortcut''s, which adds the .exe extension to the Target when it is not supplied on the command-line (what appeared on the command-line appears verbatim in the Comment field, however). [vav] test> ls -l total 909 -rwxr-xr-x 1 swift Administ 930304 Sep 29 13:05 program.exe [vav] test> ln -s program symlink-to-base [vav] test> ln -s program.exe symlink-to-full [vav] test> ln -s program symlink-to-base.exe [vav] test> ln -s program.exe symlink-to-full.exe [vav] test> ln program hardlink-to-base ln: creating hard link `hardlink-to-base' to `program': No such file or directory [vav] test> ln program.exe hardlink-to-full [vav] test> ln program hardlink-to-base.exe ln: creating hard link `hardlink-to-base.exe' to `program': No such file or directory [vav] test> ln program.exe hardlink-to-full.exe [vav] test> mkshortcut program [vav] test> mkshortcut program.exe [vav] test> ls -l total 2729 -rwxr-xr-x 3 swift Administ 930304 Sep 29 13:05 hardlink-to-full -rwxr-xr-x 3 swift Administ 930304 Sep 29 13:05 hardlink-to-full.exe -rwxr-xr-x 3 swift Administ 930304 Sep 29 13:05 program.exe -rwxrwxr-x 1 swift Administ 661 Sep 29 13:38 program.exe.lnk -rwxrwxr-x 1 swift Administ 433 Sep 29 13:37 program.lnk lrwxrwxrwx 1 swift Administ 94 Sep 29 13:36 symlink-to-base -> program lrwxrwxrwx 1 swift Administ 94 Sep 29 13:36 symlink-to-base.exe -> program lrwxrwxrwx 1 swift Administ 102 Sep 29 13:36 symlink-to-full -> program.exe lrwxrwxrwx 1 swift Administ 102 Sep 29 13:36 symlink-to-full.exe -> program.exe [vav] test> [vav] test> hostname; uname -a vav CYGWIN_NT-5.1 vav 1.5.5(0.94/3/2) 2003-09-20 16:31 i686 unknown unknown Cygwin [vav] test> type ln ln is hashed (/usr/bin/ln) [vav] test> cygcheck -f /usr/bin/ln fileutils-4.1-2 [vav] test> cygcheck -c fileutils Cygwin Package Information Package Version Status fileutils 4.1-2 OK -- 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |