Skip to content
Tcl Source Code Artifact [30f75b7c06]
Login

Artifact [30f75b7c06]

Artifact 30f75b7c0618278e58b5efa91ce51e5a3fd761f2114aba596298f1fbfa5c9028:

Ticket change [30f75b7c06] - Ticket [b0682c3c2497e8f2|b0682c3c24] <i>glob error</i> status still Open with 4 other changes by apnadkarni on 2026-03-18 16:04:36.
D 2026-03-18T16:04:36.573
J comment I\shave\sthe\sfollowing\sstrange\sbehaviour\sunder\sWindows\s10\swith\stcl_patchLevel=9.0.0\s(and\stcl_patchLevel=9.0.1\sfrom\sBAWT)\r\n\r\n(bin)\s1\s%\sset\stcl_patchLevel\r\n9.0.0\r\n(bin)\s2\s%\sglob\sZ:/Basistests/200*\r\nZ:/Basistests/2000_00_00\s{Z:/Basistests/2000_00_00\s-\sTest}\r\n(bin)\s3\s%\sglob\s-types\sd\sZ:/Basistests/200*\r\nZ:/Basistests/2000_00_00\s{Z:/Basistests/2000_00_00\s-\sTest}\r\n(bin)\s4\s%\sglob\s-types\sd\s-directory\sZ:/Basistests\s-tails\sZ:/Basistests\s200*\r\nZ:Basistests\s2000_00_00\s{2000_00_00\s-\sTest}\r\n(bin)\s5\s%\sglob\s-types\sd\s-directory\sZ:/Basistests\s-tails\sZ:/Basistests\sZ:/Basistests/200*\r\ncouldn't\sread\sdirectory\s"Z:/Basistests/Z:Basistests/200*":\snot\sa\sdirectory\r\n\r\nUnder\stcl8\sI\sgot:\r\n\r\n(ABS)\s1\s%\sglob\s-types\sd\s-directory\sZ:/Basistests\s-tails\sZ:/Basistests\s200*\r\n2000_00_00\s{2000_00_00\s-\sTest}\r\n(ABS)\s2\s%\sglob\s-types\sd\s-directory\sZ:/Basistests\s-tails\sZ:/Basistests\sZ:/Basistests/200*\r\nno\sfiles\smatched\sglob\spatterns\s"Z:/Basistests\sZ:/Basistests/200*"\r\n\r\nThe\sadditional\sstring\s"Z:Basistests"\son\scomcd\smand\s4\sis\swrong.\r\n\r\nEven\smore\sperplexing\sis\sthe\sfollowing\s(under\sTcl/Tk\s9.0.0):\r\n\r\n(ABS)\s1\s%\sglob\s-types\sd\s-directory\sZ:/Basistests\s-tails\sZ:/Basistests\s200*\r\nZ:Basistests\s2000_00_00\s{2000_00_00\s-\sTest}\r\n(ABS)\s2\s%\scd\sZ:Basistests\r\n(Basistests)\s3\s%\spwd\r\nZ:/Basistests\r\n(Basistests)\s4\s%\scd\sC:\r\n()\s5\s%\scd\sZ:Basistests\r\n(Basistests)\s6\s%\scd\s2000_00_00\r\n(2000_00_00)\s7\s%\scd\sZ:Basistests\r\ncouldn't\schange\sworking\sdirectory\sto\s"Z:Basistests":\sno\ssuch\sfile\sor\sdirectory\r\n(2000_00_00)\s8\s%
J icomment Potential\sfix\sin\sthe\s[bug-b0682c3c24](https://core.tcl-lang.org/tcl/timeline?r=bug-b0682c3c24)\sbranch.\sBut\ssee\sbelow.\r\n\r\n```\r\n%\sglob\sd:/Basistests/200*\r\nd:/Basistests/2000_00_00\s{d:/Basistests/2000_00_00\s-\sTest}\r\n%\sglob\s-types\sd\sd:/Basistests/200*\r\nd:/Basistests/2000_00_00\s{d:/Basistests/2000_00_00\s-\sTest}\r\n%\sglob\s-types\sd\s-directory\sd:/Basistests\s-tails\sd:/Basistests\s200*\r\n2000_00_00\s{2000_00_00\s-\sTest}\r\n%\sglob\s-types\sd\s-directory\sd:/Basistests\s-tails\sd:/Basistests\sd:/Basistests/200*\r\n%\r\n```\r\n\r\nwhich\sseems\sreasonable\sto\sme.\sThe\scd\sissues\sin\sthe\soriginal\sticket\sI\sdidn't\squite\sunderstand\sas\sit\sseems\sto\sbe\sit\sdepends\son\swhat\sthe\s"current\sdirectory"\son\sthe\sother\sdrive\shappened\sto\sbe.\r\n\r\nIn\sthe\sexisting\simplementation,\sglob\scorrectly\sparses\sthe\s`-directory`\sand\spattern\sinto\scomponents\s`d:/basictests`,\s`d:`\sand\s`basictests`.\sHowever\swhen\schecking\sfor\sexistence,\sthe\simplementation\sinvokes\s`Tcl_FSTranslatePath`\swhich\sreparses\sthe\spath\sby\scalling\s`TclJoinPath`\swhich\sbehaves\sas\sthe\sscript\slevel\s`join`\scommand\swhich\sdiscards\sany\scomponents\sprior\sto\sanything\san\sabsolute\sor\svolume-relative\scomponent.\sIn\sthis\scase\s`d:`\sis\sthe\svolume\srelative\scomponent\sso\sthe\sexistence\scheck\sis\smade\sagainst\s"d:Basictests".\sThe\sresult\swill\sthen\sdepend\son\swhether\sthe\s"current\sdirectory"\son\sdrive\sD:\sis\sthe\sroot\sor\snot.\r\n\r\nAs\sa\sfix,\sit\sseems\sto\sme\sthat\s`Tcl_FSGetTranslatedPath`\sis\sbroken\sin\sthis\sbehaviour.\sNot\sonly\sis\sthis\s"join-like"\sbehaviour\smentioned\sanywhere\sin\sthe\sdocumentation,\sI\salso\sthink\sit\sdoes\snot\smake\ssemantic\ssense.\sThe\sfunction\sis\ssupposed\sto\stranslate\sa\ssingle\spath\sand\sshould\snot\sbe\sdiscarding\sany\scomponents.\sIn\sparticular\son\sUnix,\sit\salready\sbehaves\sthis\sway\sby\snot\streating\sa\sleading\s`/`\sin\sa\spattern\sas\san\sabsolute\spath.\r\n\r\n```\r\n%\sglob\s-directory\s/tmp\s/foo\r\n/tmp/foo\r\n```\r\n\r\nI\stherefore\sconsider\sthis\sas\sa\sbug\sfix\sand\snot\sa\schange\sto\sdefined\sor\sexpected\s`Tcl_FSGetTranslatedPath`\sbehavior\s(which\swould\srequire\sa\sTIP).\r\n\r\nOpinions?
J login apnadkarni
J mimetype text/x-markdown
K b0682c3c2497e8f27f18e91686031dda055ed19c
U apnadkarni
Z f286fd52c5902943c51738261d4be5f5