OS: Windows/Cygwin
% set a [file join / var tmp *]
/var/tmp/*
% set b [glob $a]
{D:/cygwin/var/tmp/errors} D:/cygwin/var/tmp/p.log
From the glob documentation (8.4.5), I expected:
{/var/tmp/errors} /var/tmp/p.log
So, without the windows style such as provided
(as expected) by file normalize.
% file normalize /var/tmp/errors
D:/cygwin/var/tmp/errors
This behaviour brokes a script designed on a Unix
box:
A [lsearch -exact] between a result of a
[split [glob [file join ...]]] and a
[file join ...]
The glob introduces the windows drive but not
the file join.
It may be the normal behaviour. If so, I think
it should be more clear in the doc.
Logged In: YES
user_id=72656
This should be noted in the docs, but it is the correct
behavior. It's the oddity of cygwin in the mix that is the
difference.
Logged In: YES
user_id=994002
So be it.
As a workaround, I added a [file normalize] to the
[file join] for the [lsearch] to compare things of the
same style.
Logged In: YES
user_id=32170
I don't really use or know cygwin, and can't really comment
on this. For ordinary Win-Tcl it all works fine.
Since the Cygwin port is now derived from
the UNIX port, This issue can be considered
out of date: Drive prefixes, as on Windows,
are not used any more So, closing