Skip to content
Tcl Source Code Artifact [5b8b36c28a]
Login

Artifact [5b8b36c28a]

Artifact 5b8b36c28afd596df56ec6c1723ef90a9c3f459bac1a64904afd79c3722e9ae4:

Ticket change [5b8b36c28a] - New ticket [108904173c1a823a|108904173c] <i>glob and file normalize inconsistencies on case sensitive filesystem</i>. by juliannoble2 on 2026-03-16 04:01:05.
D 2026-03-16T04:01:05.521
J assignee nobody
J closer nobody
J cmimetype text/x-fossil-plain
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-sensitive\sfilesystem\sis\smounted\son\sa\splatform\sthat\sisn't\snormally\sused\swith\scase-sensitive\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 foundin 8.6,9
J is_private 0
J login juliannoble2
J priority 5\sMedium
J private_contact 957fdfcd8744611e3fe1f4896c7538b1d9bf47b2
J resolution None
J severity Important
J status Open
J submitter juliannoble2
J subsystem 37.\sFile\sSystem
J title glob\sand\sfile\snormalize\sinconsistencies\son\scase\ssensitive\sfilesystem
J type Bug
K 108904173c1a823a20823885c7b29ab536434a5a
U juliannoble2
Z 001e08f2120afd15a89403275eb3b238