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