Tcl Source Code

Artifact Content
Login

Artifact 3d3271ca51422e3ce3c9d1ac47b9ff26d843b2045b58b3955e123f24cd719068:

Ticket change [3d3271ca51] - Ticket [e83a97c7fee9d6bc|e83a97c7fe] <i>windows: paths starting with tilde (~) are &quot;partially&quot; absolute</i> status still Open with 3 other changes by sebres 2019-11-08 13:30:37.
D 2019-11-08T13:30:37.574
J comment Issue\scould\sbe\sconsidered\sas\scontinuation\sof\s[9e6b569963]...\r\n\r\nNote\sthe\sticket\sis\sonly\sabout\s<code>~*</code>\sand\snot\s<code>~/*</code>\s(which\scould\sbe\sfirstly\sconsidered\sas\srather\sabsolute\spath).\r\n\r\nUnder\swindows\sit\sis\spossible\sto\shave\srelative\spaths\s(file\sand\sdirectory\snames)\sstarting\swith\stilde,\sas\ssuch\sit\sis\s"partially\sabsolute"\spath,\sso\sin\smy\sopinion\sshould\sbe\sinterpreted\sas\srelative\sif\sused\sin\sfile\sjoin.<br/>\r\nFrom\sthis\spoint\sof\sview\s<code>file\sjoin\s$dirname\s$filename</code>\sbehaves\sincorrectly\sunder\swindows\sif\s<code>filename</code>\sstarting\swith\s<code>~</code>\scharacters:\r\n\r\n<code><pre\sstyle="padding-left:10pt">\r\n%\sfile\sjoin\s$env(tmp)\s~*\r\n~*\r\n%\sfile\sjoin\s$env(tmp)\s~abc.txt\r\n~abc.txt\r\n</pre></code>\r\n\r\nWhere\s<code>glob</code>\salready\shas\scorrect\sbehavior\shere:\r\n<code><pre\sstyle="padding-left:10pt">\r\n%\sglob\s-directory\se:/temp\s~*\r\ne:/temp/~abc.txt\r\n%\sglob\se:/temp/~*\r\ne:/temp/~abc.txt\r\n%\scd\se:/temp\r\n%\sglob\s[pwd]/~*\r\nE:/Temp/~abc.txt\r\n</pre></code>\r\n\r\nJust\sthis\sone\sis\sa\sbit\sconfusing\s(I\sknow\sit\sis\sa\sbit\s"ambiguous",\sbut...):\r\n<code><pre\sstyle="padding-left:10pt">\r\n%\sglob\s~*\r\nuser\s"*"\sdoesn't\sexist\r\n</pre></code>\r\nDespite\sambiguity\sit\slooks\sstill\sweird\sto\sme:\r\n\r\n<ol>\r\n<li>\seither\sthe\sdecision\sremains\s"path\sof\spattern\sis\sabsolute",\sit\scould\sbe\sfixed\sto\slist\sall\susers/homes\swhere\scaller\sis\spermitted.</li>\r\n<li>\sor\sthe\sdecision\sgoing\seither\sto\s"path\sof\spattern\sconsidered\sas\srelative"\sunder\swindows,\sit\sshould\sbehave\slike\s<code>glob\s[pwd]/~*</code>\s(so\sfind\sall\sfiles\sstarting\swith\s"~"\sin\scurrent\sdirectory).</li>\r\n</ol>\r\n\r\nAnyway\s(after\sfix)\sit\scould\sbe\sadditionally\sdocumented\s(with\sdifference\sbetween\sunix/windows).
J login sebres
J mimetype text/plain
K e83a97c7fee9d6bc2bec78d70b205a0e4d09ea8d
U sebres
Z 4ab0ad1b9b1f070aa1819ba81eb63b0b