glob -dir . returns corrupted/phantom entries near the top of the zipfs:/ tree
Closed / Fixed4676f5c780901f2df5b025b8270eaeabbfbd9095Created 122 days agoUpdated 114 days ago
Descriptionplain2026-08-03 22:12:33
Environment: Tcl 9.1b1, built from source (tclsh9.1), Ubuntu Linux. Reproduction, from a fresh tclsh: cd //zipfs:// pwd glob * glob -dir . * cd lib glob * glob -dir . * cd tcl glob * glob -dir . * cd tcl_library glob t* glob -dir . t* Actual output: % cd //zipfs:// % pwd //zipfs:/ % glob * lib % glob -dir . * ./ib/tcl % cd lib % glob * tcl % glob -dir . * ./tcl ./b/tcl % cd tcl % glob * tcl_library % glob -dir . * ./tcl_library % cd tcl_library % glob t* tclIndex tcltest tm.tcl tzdata % glob -dir . t* ./tclIndex ./tcltest ./tm.tcl ./tzdata At //zipfs:/ (which contains only "lib"), plain glob * correctly returns "lib", but glob -dir . * returns "./ib/tcl" instead. One level down, in lib (which contains only "tcl"), plain glob * correctly returns "tcl", but glob -dir . * returns "./tcl ./b/tcl". Two levels down (lib/tcl) and further (lib/tcl/tcl_library), glob -dir . * and glob -dir . t* both return correct results, matching plain glob exactly. This was repeatable for me. I'd appreciate it if someone could try the commands above and see if they get the same result.
apnadkarniplain2026-08-08 04:28:24
Confirmed to be a bug in 9.0 as well.
apnadkarniplain2026-08-08 08:59:14
Proposed fix in [c97ece9549].
apnadkarniplain2026-08-11 14:50:30
Fixed in [dd6eeb51fa].
Log in (anonymous is fine) to add a comment.