delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/10/20/06:29:05

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-0.0 required=5.0 tests=BAYES_40,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
Date: Wed, 20 Oct 2010 12:28:39 +0200
From: Jeremy Davies <jeremy DOT davies AT etherstack DOT com>
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: TCL and Cygwin 1.7 symlinks
X-DSPAM-Result: Innocent
X-DSPAM-Processed: Wed Oct 20 21:28:45 2010
X-DSPAM-Confidence: 1.0000
X-DSPAM-Probability: 0.0023
X-DSPAM-Signature: 4cbec45d148823907411856
Message-Id: <20101020102846.0222F121C002@mail.etherstack.com>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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

  I know that Cywin TCL is not a 'real' Cygwin port, but I've noticed 
the following behaviour:

$ cd /tmp
$ mkdir x1
$ mkdir x1/foo
$ echo abc >x1/foo/bar
$ mkdir x2
$ cd x2
$ ln -s ../x1/foo
$ cat foo/bar
abc
$ tclsh
% file normalize foo
C:/Cygwin/tmp/x1/foo
% file readlink foo
could not readlink "foo": invalid argument
% exit
$ readlink foo
../x1/foo


There are three inconsistencies here:
- TCL 'file readlink' fails.  Fair enough, if the Cygwin TCL build 
doesn't understand Cygwin 1.7 symlinks (as suggested by the TCL FAQ 4.45).
- But TCL 'file normalize' is successfully resolving the symlink!
- Doublebut TCL 'file normalize' is not meant to resolve a symlink at 
the end of a path.  The normalized path should be 'C:/Cygwin/tmp/x2/foo'.

What's going on?

Jeremy



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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019