Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2012-07-17
01:55 • Closed ticket [2915945fff]: glob problems with -directory "" or -pat... artifact: 7f106096af user: dgp
01:14 • Ticket [2915945fff]: 4 changes artifact: 94babc8e03 user: dgp
01:08 • Ticket [2915945fff]: 4 changes artifact: 9c7ae1f1d6 user: stwo
2009-12-18
16:25 • Ticket [2915945fff]: 1 change artifact: 57b7a99c80 user: dkf
16:25 • Ticket [2915945fff]: 4 changes artifact: 8539228d1a user: dkf
2009-12-17
23:42 • Ticket [2915945fff]: 4 changes artifact: 115d9f843b user: dgp
18:12 • Ticket [2915945fff]: 5 changes artifact: 54d6728569 user: dkf
01:09 • New ticket [2915945fff]. artifact: 027917e256 user: stwo

[glob] problems with -directory "" or -path ""

Closed / Fixed2915945fffffffffffffffffffffffffffffffffCreated 17 years agoUpdated 14 years ago
Descriptionplain2009-12-17 01:09:50
$ echo '#nothing' > q 
$ tclsh8.5.8

With Tcl 8.5.0-8.5.2 this will segfault.
Tcl 8.5.3-8.5.8 will give the following:

% glob -directory "" q
no files matched glob pattern "q"
% glob -directory "" q
/q

The -path option gives the same results for all tcl8.5.*

% glob -path "" q
no files matched glob pattern "q"


Tcl 8.4 seems fine:

$ tclsh8.4.19
% glob -directory "" q
q
% glob -path "" q
q
dkfplain2009-12-17 18:12:19
8.6 HEAD is the same as 8.5.8
dgpplain2009-12-17 23:42:27
see 2001389.

The meaning of an empty string as
a filesystem pathname is undefined.
No filesystem driver claims (can claim?) it.

% file system {}
Unrecognised path

Maybe the empty path name once
meant something, and no longer does
due to bugs implementing VFS.  Code
comments indicate otherwise, though.

At best it's a confused mess you cannot
rely on.  Do not use {} where a filesystem
pathname is expected.
dkfplain2009-12-18 16:25:24
Perhaps it should be forced to be an error in this case then.
dkf Ticket [2915945fff]: 1 change [History diff]2009-12-18 16:25:25
stwoplain2012-07-17 01:08:29
I now get the same results with 8.5.12rc0 and Trunk as I was getting with 8.4.19.
Does that mean that this has been fixed?
dgpplain2012-07-17 01:14:33
I'd say it means an undefined case has used
its freedom to change its output without impact
on correctness. :/
dgpplain2012-07-17 01:55:23
allow_comments - 1

For the record, the fix for Bug 3414754 made
this change.  "Fixed" in 8.5.11.
Log in (anonymous is fine) to add a comment.