Skip to content
Tcl Source Code Artifact [3c6492178a]
Login

Artifact [3c6492178a]

Artifact 3c6492178a1c541e19de2663ad9754cbaf5981695ff37155475e61e8455e74fe:

Ticket change [3c6492178a] - Ticket [108904173c1a823a|108904173c] <i>glob and file normalize inconsistencies on case insensitive filesystem</i> status still Open with 3 other changes by juliannoble2 on 2026-03-16 05:47:15.
D 2026-03-16T05:47:15.820
J comment Initial\ssetup\sis\sa\sfolder\son\san\sNTFS\sfilesystem\sC:\\SDX\r\nfile\sin\sthat\sfolder\sis\ssdx1.bat\r\nPlatform\sis\swindows\s11.\r\n\r\nWhen\sglobbing\sfor\sthat\sfile\sthere\sis\sa\sdifference\sin\sthe\sresults\sdepending\son\swhether\sany\sglob\schars\sare\sused,\sand\sthe\sresult\sof\sa\s'file\snormalize'\son\sa\sresult\sthat\sdidn't\suse\sglob\schars\sdoesn't\snormalize\sto\sthe\scase\sof\sthe\sunderlying\sfile.\r\n\r\n%\sset\sfiles\s[glob\s-dir\sC:/SDX\sSDX1.bat\s{[S]DX1.bat}\sSdX1.bat*]\r\nC:/SDX/SDX1.bat\sC:/SDX/sdx1.bat\sC:/SDX/sdx1.bat\r\n\r\n%file\snormalize\s[lindex\s$results\s0]\r\nC:/SDX/SDX1.bat\r\n\r\nI\sexpected\sto\sget\sthe\sresult\scased\sas\sper\sthe\sfilesystem.\r\nTo\sget\sit\sto\snormalize\sto\sthe\sunderlying\sfilesystem's\scase,\staking\sa\sstring\srange\sworks,\sbut\sother\soperations\ssuch\sas\sstring\scat\sdon't.\r\n\r\n%file\snormalize\s[string\srange\s[lindex\s$results\s0]\s0\send]\r\nC:/SDX/sdx1.bat\r\n\r\n\r\nDue\sto\sthe\sinability\sto\snormalize\sto\sget\sunderlying\scase\s-\sI\swas\stempted\sto\suse\sredundant\sglobbing\swith\ssquare\sbrackets\sfor\sthe\scase\swhere\suser\sinput\shad\sno\sglob\schars.\r\nie\suse\sthe\s{[S]DX1.bat}\spattern\sif\suser\sentered\sSDX1.bat.\r\n\r\nThis\sworks\son\swindows\s-\sbut\sthen\sdoesn't\swork\sfor\sthe\ssame\sfilesystem\smounted\son\sanother\splatform:\r\n\r\n(in\sthis\scase\susing\sWSL\s2\son\ssame\swindows\smachine\sto\stest\s-\sbut\spresumably\swould\saffect\sa\sreal\sunix-like\ssystem\swith\sNTFS\sfilesystem\smounted)\r\n\r\n%glob\s-dir\s/mnt/c/SDX\sSDX1.bat\r\n/mnt/c/SDX/SDX1.bat\r\n\r\nThis\sresult\spasses\sfile\sexists\stest\s-\sbut\salso\sisn't\snormalizable\sto\sget\sthe\sactual\sunderlying\scase\s-\sas\spresumably\sfile\snormalize\sis\sbehaving\sbased\son\splatform\srather\sthan\sattached\sfilesystem\sproperties.\r\n\r\n%glob\s-dir\s/mnt/c/SDX\s{[S]DX1.bat}\r\n(no\sresult)\r\n\r\nI\sfeel\seither\sneither\sof\sthese\sshould\sreturn\sa\sresult\sor\sboth\sshould.\r\n\r\n\r\nI\swould\sexpect\seither\sglob\sto\salways\sreturn\sa\sresult\sthat\smatches\sthe\sactual\sfilesystem\scase,\sor\sif\snot,\sfor\sit\sto\sbe\snormalizable\swithout\s'string'\sshennanigans\sto\sthe\sunderlying\scase.\r\n\r\n(I'd\shalf\sexpect\s'file\snormalize\s/mnt/c/SDX/SDX1.bat'\sto\snormalize\sto\s/mnt/c/SDX/sdx1.bat\son\sa\sunix\splatform\swith\sattached\scase-insensitive\sfilesystem\s-\sbut\sI\sthink\sthat\sassumption\sisn't\ssupported\sin\sthe\sdocs.\sThis\sbehaviour\sseems\slike\sa\sshortcoming\sor\sperhaps\sa\sdesign\sdecision)\r\n\r\nFor\sthe\ssituation\swhere\sthe\scase-insensitive\sfilesystem\sis\smounted\son\sa\splatform\sthat\sisn't\snormally\sused\swith\scase-insensitive\sfilesystems\s-\sI'd\sideally\sexpect\sit\sto\sbe\sable\sto\sglob\sfor\spatterns\sindependent\sof\scase\son\sthat\sfilesystem\s-\sbut\sat\sthe\svery\sleast\sI\swouldn't\sexpect\sdifferent\sresults\sfrom\spatterns\sSDX1.bat\svs\s{[S]DX1.bat}\r\n\r\nI'm\snot\ssure\sif\sthis\sis\s1\sor\s2\sbugs.\sI\shaven't\sbeen\sable\sto\sfully\swork\sout\sfrom\sdocs\swhat\sthe\sintended\sbehaviours\sare.
J login juliannoble2
J mimetype text/plain
K 108904173c1a823a20823885c7b29ab536434a5a
U juliannoble2
Z fa399bdf82334d2c27e9ae7163cef18f