X-Recipient: archive-cygwin@delorie.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.davies@etherstack.com>
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: TCL and Cygwin 1.7 symlinks
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
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@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.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

