Skip to content
Tcl Source Code Artifact [111d5ff19d]
Login

Artifact [111d5ff19d]

Artifact 111d5ff19d66b1acc3074d553cb687aa5435762a:

Ticket change [111d5ff19d] - New ticket [8527d8becf29df06|8527d8becf] <i>Commands cd, glob and normalize may fail on Windows if used with network locations containing NTFS junctions</i>. by mfriedrich on 2016-03-02 21:29:24.
D 2016-03-02T21:29:24.050
J assignee nobody
J closer nobody
J cmimetype text/plain
J comment On\sWindows,\sit\sseems\sif\spaths\sare\sused\swhich\spoint\sto\snetwork\slocations.\sand\sthose\snetwork\slocations\scontain\sjunctions,\sthen\sTcl\sresolves\sthose\sjunctions,\sbut\sshould\snot.\sThose\sjunctions\salways\spoint\sto\sdrives\son\sthe\sserver.\sTcl\streats\sthem\sas\slocal\sdrives,\swhich\sthey\sare\snot.\r\n\r\nTo\stest:\r\nOn\sa\sWindows\sserver\s(must\snot\sbe\sthe\ssame\sas\sthe\sbelow\sWindows\sclient):\r\n*\sadd\sa\snew\sdrive/partition,\sformat\sas\sNTFS\sand\sgive\sit\sthe\sletter\sP\r\n*\screate\sthis\sfolder\sstructure:\sP:\\Share\\Bar\\subdir\r\n*\screate\sa\sjunction:\sP:\\Share\\Foo\spointing\sto\s-->\sP:\\Share\\Bar\r\n*\screate\sa\sdummy\sfile:\sP:\\Share\\Bar\\subdir\\dummy.txt\r\n*\screate\slocal\suser\s"user"\swith\spassword\s"password"\r\n*\sshare\sthe\sfolder\sP:\\Share\sas\sShareOnDriveP\sfor\suser\s"user"\sfull\saccess\r\n\r\nOn\sthe\sWindows\sclient/workstation\sside\swith\sa\sTcl\sinstallation:\r\n*\smount\sthe\snetwork\sshare\sas\sdrive\sM:\r\n\s\s\snet\suse\sm:\s\\\\server\\ShareOnDriveP\s/user:server\\user\spassword\r\n*\smake\ssure\syou\shave\sno\slocal\sdrive\swith\sletter\sP\r\n*\srun\sthis\son\stclsh.exe\r\n\r\nset\sresult\s0\r\n\r\nputs\s"M:/Foo/subdir=[file\snormalize\sM:/Foo/subdir]"\r\nputs\s"M:/Bar/subdir=[file\snormalize\sM:/Bar/subdir]"\r\nputs\s"\\n"\r\n\r\nif\s{[catch\s{\r\n\s\s\s\scd\sM:/Bar/subdir\r\n\s\s\s\sset\sdir\s[pwd]\r\n\s\s\s\sif\s{$dir\sne\s"M:/Bar/subdir"}\s{\r\n\s\s\s\s\s\sputs\sstderr\s"test\s1\sfailed"\r\n\s\s\s\s\s\sset\sresult\s1\r\n\s\s\s\s}\selse\s{\r\n\s\s\s\s\s\sputs\sstderr\s"test\s1\spassed"\r\n\s\s\s\s}\r\n}\sstatus]}\s{\r\n\s\s\s\sputs\sstderr\s"test\s1\sfailed\\n$errorInfo"\r\n\s\s\s\sset\sresult\s1\r\n}\r\n\r\nputs\s"\\n"\r\n\r\nif\s{[catch\s{\r\n\s\s\s\scd\sM:/Bar\r\n\s\s\s\scd\ssubdir\r\n\r\n\s\s\s\sset\sdir\s[pwd]\r\n\s\s\s\sif\s{$dir\sne\s"M:/Bar/subdir"}\s{\r\n\s\s\s\s\s\sputs\sstderr\s"test\s2\sfailed"\r\n\s\s\s\s\s\sset\sresult\s1\r\n\s\s\s\s}\selse\s{\r\n\s\s\s\s\s\sputs\sstderr\s"test\s2\spassed"\r\n\s\s\s\s}\r\n}\sstatus]}\s{\r\n\s\s\s\sputs\sstderr\s"test\s2\sfailed\\n$errorInfo"\r\n\s\s\s\sset\sresult\s1\r\n}\r\n\r\nputs\s"\\n"\r\n\r\nif\s{[catch\s{\r\n\s\s\s\scd\sC:/\r\n\r\n\s\s\s\sset\slist\s[glob\s-directory\sM:/Bar/subdir\s-tail\s*]\r\n\s\s\s\sif\s{$list\sne\s{dummy.txt}}\s{\r\n\s\s\s\s\s\sputs\sstderr\s"test\s3\sfailed"\r\n\s\s\s\s\s\sset\sresult\s1\r\n\s\s\s\s}\selse\s{\r\n\s\s\s\s\s\sputs\sstderr\s"test\s3\spassed"\r\n\s\s\s\s}\r\n}\sstatus]}\s{\r\n\s\s\s\sputs\sstderr\s"test\s3\sfailed\\n$errorInfo"\r\n\s\s\s\sset\sresult\s1\r\n}\r\n\r\ncd\sC:/\r\nfile\sdelete\sC:/test-link\r\nfile\sdelete\s-force\sC:/test-target\r\nexit\s$result\r\n\r\n\r\n\r\nIt\sproduces\sthe\soutput:\r\nM:/Foo/subdir=M:/Foo/subdir\r\nM:/Bar/subdir=/Bar/subdir\r\n\r\n\r\ntest\s1\sfailed\r\ncouldn't\schange\sworking\sdirectory\sto\s"M:/Bar/subdir":\sno\ssuch\sfile\sor\sdirectory\r\n\s\s\s\swhile\sexecuting\r\n"cd\sM:/Bar/subdir"\r\n\r\n\r\ntest\s2\spassed\r\n\r\n\r\ntest\s3\sfailed\r\ncouldn't\sread\sdirectory\s"/Bar/subdir/*":\sno\ssuch\sfile\sor\sdirectory\r\n\s\s\s\swhile\sexecuting\r\n"glob\s-directory\sM:/Bar/subdir\s-tail\s*"
J foundin 8.6.4.1
J is_private 0
J login mfriedrich
J priority 5\sMedium
J private_contact a3e196ae61223ed094178305110e4d1d8ccbac2b
J resolution None
J severity Important
J status Open
J submitter mfriedrich
J subsystem 36.\sPathname\sManagement
J title Commands\scd,\sglob\sand\snormalize\smay\sfail\son\sWindows\sif\sused\swith\snetwork\slocations\scontaining\sNTFS\sjunctions
J type Bug
K 8527d8becf29df06d2563a2abde5983043285f18
U mfriedrich
Z 375f6ba7c36355d543e899d5f06692c6