Skip to content
Tcl Source Code Artifact [56788edbac]
Login

Artifact [56788edbac]

Artifact 56788edbacf25bbacbb64cca26de211eb0dceedb173d24a938314e2f2a1d15c9:

Ticket change [56788edbac] - New ticket [d8f12171564f57c9|d8f1217156] <i>windows dos device paths inconsistencies and missing functionality</i>. by juliannoble2 on 2024-08-11 14:56:59.
D 2024-08-11T14:56:59.605
J assignee nobody
J closer nobody
J cmimetype text/x-fossil-plain
J comment Tcl\sseems\sonly\sto\ssupport\sthe\s//?/\sdos\sdevice\ssyntax\sfor\spaths\sreferencing\sa\slocal\sfile\svolume.\s\r\n\r\nUse\sof\s//?/\son\snon-volume\spaths\swill\sgive\serroneous\s'file\sexists'\sresults\s(possibly\sdue\sto\sfile\spathtype\sreporting\sthem\sas\s'relative')\r\n\r\nIt\sPartially\ssupports\s//./\ssyntax\s\r\n\r\nI\sknow\sthis\sis\sa\slongstanding\sissue\sin\sa\scurly\spart\sof\sthe\scode\s-\sbut\sI'd\slike\sto\sdocument\ssome\sof\sthe\seffects\shere.\r\n\r\ne.g\r\n\r\n\s\s\s\s%file\sexists\s//?/c:/test\r\n\s\s\s\s1\r\n\s\s\s\s%file\sexists\s//./c:/test\r\n\s\s\s\s0\s(ideally\sshould\swork\s-\sespecially\sgiven\sthe\sexamples\sbelow\swhere\s//./\ssyntax\sis\srequired\sfor\sany\saccess)\r\n\r\nAnomalously\sthe\sreverse\stype\sof\smust\sbe\sused\sfor\sother\ssituations:\r\n\r\n\s\s\s\s%file\sexists\s//?/BootPartition/test\r\n\s\s\s\s0\s(Not\sok)\r\n\s\s\s\s%file\sexists\s//./BootPartition/test\r\n\s\s\s\s1\s(OK\s-\sbut\sthen\sone\swould\sreasonably\sexpect\s//./c:/test\sto\swork\stoo)\r\n\s\s\s\s%file\sexists\s//?/UNC/LOCALHOST/c$/test\r\n\s\s\s\s0\s(Not\sok)\r\n\s\s\s\s%file\sexists\s//./UNC/LOCALHOST/c$/test\r\n\s\s\s\s1\s(OK)\r\n\r\nThe\s//?/\sis\s(for\sme\sat\sleast)\sgenerally\sthe\smore\suseful\sform\s-\sas\sit\sis\sthe\s'non\snormalizing'\sversion\swhich\sallows\saccess\sto\sotherwise\sillegal\sfile\snames\sfor\swindows\s(e.g\spath\ssegment\sending\sin\sdot\sor\sspace)\r\nie\sit\spasses\sotherwise\sillegal\spaths\sthrough.\r\n\r\nAs\sit\sstands\s-\spaths\ssuch\sas\s"c:/test/illegal."\scannot\sbe\saccessed\sby\sUNC\sor\snon-volume\sbased\sdos\sdevice\spaths.\r\n\r\nThese\sso\scalled\s'illegal'\spaths\scan\sexist\squite\shappily\son\swindows\sNTFS\s-\seither\son\sremote\sUNC\spaths\sor\slocally\sfor\sexample\sif\sa\sunix\sdirectory\sis\scopied\sover/imported.\r\nTo\stest\screate\sone\son\sthe\slocal\smachine\sit\scan\sbe\sdone\sfrom\sTcl\svia\sfor\sexample:\r\nfile\smkdir\s//?/c:/test/illegal.\r\n\r\n\s\s\s\s%file\sexists\sc:/test/illegal.\s\r\n\s\s\s\s0\s(ok\s-\snot\sexpected\sto\saccess\sit\svia\splain\spath)\r\n\s\s\s\s%file\sexists\s//?/c:/test/illegal.\r\n\s\s\s\s1\s\s(ok\s-\sas\sexpected)\r\n\s\s\s\s%file\sexists\s//./c:/test/illegal.\r\n\s\s\s\s0\s\s(ok\s-\sdot\sis\sthe\s'normalizing'\sversion\sof\sdos\sdevice\spath\sso\sit's\sactually\stesting\sc:/test/illegal\swithout\sthe\sdot)\r\n\s\s\s\s%file\sexists\s//./c:/test\r\n\s\s\s\s0\s(Not\sreally\sok\s-\sif\sthe\spath\sexists\sand\sis\snot\s'illegal'\swe\sshould\sbe\sable\sto\suse\sthe\s//./\spath\stoo)\r\n\r\n\s\s\s\s%file\sexists\s//LOCALHOST/c$/test/illegal.\r\n\s\s\s\s0\s(OK)\r\n\s\s\s\s%file\sexists\s//?/UNC/LOCALHOST/c$/test/illegal.\r\n\s\s\s\s0\s(Not\sok)\r\n\s\s\s\s%file\sexists\s//./UNC/LOCALHOST/c$/test/illegal.\r\n\s\s\s\s0\s(OK)\r\n\s\s\s\s%file\sexists\s//?/UNC/LOCALHOST/c$/test\r\n\s\s\s\s0\s(Not\sok)\r\n\r\nEven\swithout\sthe\srequirement\sto\saccess\sso\scalled\s'illegal'\swindows\spaths;\sthis\smakes\sfor\sa\sconfusing\ssituation\sregarding\shandling\sof\sexisting\sdos\sdevice\spaths\s(which\ssometimes\scrop\sup)\srequiring\sknowledge\sof\swhat\sTcl\scan/can't\shandle,\sin\sorder\sfor\sthe\sprogrammer\sto\stranslate\sbefore\spassing\sto\sTcl's\sfile\sfunctions)\r\n\r\nIn\sPowershell\s-\sthe\sfollowing\sexample\sshows\show\sto\scompare\ssome\sof\sthis\sbehaviour\s\s(tolerates\sforward\sslashes\swithout\sissue)\r\n\r\n\s\s\s\s>test-path\s-literalPath\s"//?/UNC/LOCALHOST/C$/test/illegal."\r\n\s\s\s\sTrue
J foundin 8.6+
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 windows\sdos\sdevice\spaths\sinconsistencies\sand\smissing\sfunctionality
J type Bug
K d8f12171564f57c9ed3ca098d9498b9d76dfb3f7
U juliannoble2
Z d1c2542065535fb41cb5f78d1bed916f