Tcl Source Code

Artifact Content
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to tclconference@googlegroups.com
or submit via the online form by Sep 9.

Artifact 6f467290dd4cfd23483e4c812a6c4f353e779cbd534bee8521f16d0525886be8:

Ticket change [6f467290dd] - New ticket [525ccacaef] win: strange discrepancy regarding Tcl_FSStat (all file sub-commands using GetStatBuf) corresponding path by "built-in Windows names with dir path and extension". by sebres 2018-07-13 19:08:21.
D 2018-07-13T19:08:21.646
J assignee nobody
J closer nobody
J cmimetype text/x-fossil-wiki
J comment I\sfound\svery\sweird\sdiscrepancy\sregarding\sTcl_FSStat\susing\s8.6\sunder\sWindows\sfor\sfile\ssub-commands\s(that\suse\sGetStatBuf),\sdepending\sfrom\sused\spath\sby\s"built-in\sWindows\snames\swith\sdir\spath\sand\sextension".\r\n\r\nThe\sexplanation,\swhat\shappens,\scould\sbe\sprovided\sfrom\sthis\sscript:\r\n<code><pre\sstyle="padding-left:10pt;\sfont-size:85%">\r\nproc\stest_fs_nef\s{{path\s{}}\s{fn\sthis-file-does-not-exists.txt}}\s{\r\n\s\sputs\s"[set\sfn\s[file\sjoin\s$path\s$fn]]\s..."\r\n\s\sputs\s-nonewline\s[format\s[string\srepeat\s"\s\s%-8s:\s\\[%d\\]\s%s\\n"\s5]\s\\\r\n\s\s\s\satime\s[catch\s{file\satime\s$fn}\sr]\s$r\s\\\r\n\s\s\s\smtime\s[catch\s{file\smtime\s$fn}\sr]\s$r\s\\\r\n\s\s\s\ssize\s\s[catch\s{file\ssize\s$fn}\sr]\s$r\s\\\r\n\s\s\s\sstat\s\s[catch\s{file\sstat\s$fn\sstat}\sr]\s"$r\s[array\sget\sstat]"\s\\\r\n\s\s\s\stype\s\s[catch\s{file\stype\s$fn}\sr]\s$r\s\\\r\n\s\s]\r\n}\r\n\r\nputs\s[test_fs_nef\s[info\slibrary]]\r\nputs\s[test_fs_nef\s[info\slibrary]\sCON.txt]\r\n\r\nputs\s[test_fs_nef\s$::env(TEMP)]\r\nputs\s[test_fs_nef\s$::env(TEMP)\sCON.txt];\s##\shere\ssomething\sgoes\sbroken!!!\r\n</pre></code>\r\nresults\sin:\r\n<code><pre\sstyle="padding-left:10pt;\sfont-size:85%">\r\n<b>D:/Projects/tcl8.6-upstream/library/this-file-does-not-exists.txt\s...</b>\r\n\s\satime\s\s\s:\s[1]\scould\snot\sread\s"D:/Projects/tcl8.6-upstream/library/this-file-does-not-exists.txt":\sno\ssuch\sfile\sor\sdirectory\r\n\s\smtime\s\s\s:\s[1]\scould\snot\sread\s"D:/Projects/tcl8.6-upstream/library/this-file-does-not-exists.txt":\sno\ssuch\sfile\sor\sdirectory\r\n\s\ssize\s\s\s\s:\s[1]\scould\snot\sread\s"D:/Projects/tcl8.6-upstream/library/this-file-does-not-exists.txt":\sno\ssuch\sfile\sor\sdirectory\r\n\s\sstat\s\s\s\s:\s[1]\scould\snot\sread\s"D:/Projects/tcl8.6-upstream/library/this-file-does-not-exists.txt":\sno\ssuch\sfile\sor\sdirectory\r\n\s\stype\s\s\s\s:\s[1]\scould\snot\sread\s"D:/Projects/tcl8.6-upstream/library/this-file-does-not-exists.txt":\sno\ssuch\sfile\sor\sdirectory\r\n\r\n<b>D:/Projects/tcl8.6-upstream/library/CON.txt\s...</b>\r\n\s\satime\s\s\s:\s[1]\scould\snot\sread\s"D:/Projects/tcl8.6-upstream/library/CON.txt":\sno\ssuch\sfile\sor\sdirectory\r\n\s\smtime\s\s\s:\s[1]\scould\snot\sread\s"D:/Projects/tcl8.6-upstream/library/CON.txt":\sno\ssuch\sfile\sor\sdirectory\r\n\s\ssize\s\s\s\s:\s[1]\scould\snot\sread\s"D:/Projects/tcl8.6-upstream/library/CON.txt":\sno\ssuch\sfile\sor\sdirectory\r\n\s\sstat\s\s\s\s:\s[1]\scould\snot\sread\s"D:/Projects/tcl8.6-upstream/library/CON.txt":\sno\ssuch\sfile\sor\sdirectory\r\n\s\stype\s\s\s\s:\s[1]\scould\snot\sread\s"D:/Projects/tcl8.6-upstream/library/CON.txt":\sno\ssuch\sfile\sor\sdirectory\r\n\r\n<b>C:/Temp/this-file-does-not-exists.txt\s...</b>\r\n\s\satime\s\s\s:\s[1]\scould\snot\sread\s"C:/Temp/this-file-does-not-exists.txt":\sno\ssuch\sfile\sor\sdirectory\r\n\s\smtime\s\s\s:\s[1]\scould\snot\sread\s"C:/Temp/this-file-does-not-exists.txt":\sno\ssuch\sfile\sor\sdirectory\r\n\s\ssize\s\s\s\s:\s[1]\scould\snot\sread\s"C:/Temp/this-file-does-not-exists.txt":\sno\ssuch\sfile\sor\sdirectory\r\n\s\sstat\s\s\s\s:\s[1]\scould\snot\sread\s"C:/Temp/this-file-does-not-exists.txt":\sno\ssuch\sfile\sor\sdirectory\r\n\s\stype\s\s\s\s:\s[1]\scould\snot\sread\s"C:/Temp/this-file-does-not-exists.txt":\sno\ssuch\sfile\sor\sdirectory\r\n<b\sstyle="color:red">\r\nC:/Temp/CON.txt\s...\r\n\s\satime\s\s\s:\s[1]\scould\snot\sget\saccess\stime\sfor\sfile\s"C:/Temp/CON.txt"\r\n\s\smtime\s\s\s:\s[1]\scould\snot\sget\smodification\stime\sfor\sfile\s"C:/Temp/CON.txt"\r\n\s\ssize\s\s\s\s:\s[0]\s0\r\n\s\sstat\s\s\s\s:\s[0]\s\smtime\s0\satime\s0\sgid\s0\snlink\s0\smode\s8630\stype\scharacterSpecial\sctime\s0\suid\s0\sino\s0\ssize\s0\sdev\s-1\r\n\s\stype\s\s\s\s:\s[0]\scharacterSpecial\r\n</b>\r\n</pre></code>\r\n\r\nThe\sguess\sthat\ssomething\smay\sbe\swrong\son\sWindows\sself\s(e.\sg.\sother\sreturn\scode\sfrom\sWinAPI)\shas\snot\sbeen\sconfirmed:\r\n<b>the\ssame\sscript\sexecuted\sfor\s8.5th\sreturns\sthe\sexpected\sresults\sin\sthe\slast\scase</b>\s(exactly\sas\sfor\sall\s3\sfirst\scases).\r\nIt's\snot\sthe\spath\sand\sfile-name\salone,\sbecause\sthis\sweird\sbehavior\shappens\sonly\sby\s<b>the\scombination\stemp-path\stogether\swith\s"CON.txt"</b>.\r\n\r\nThis\sreflects\swhy\sthe\sseveral\scmdAH-test-cases\sfail\sif\sused\swithout\s-tmpdir\sand\ssuccessful\swith\s-tmpdir\sparameter.\r\n<code><pre\sstyle="padding-left:10pt;\sfont-size:85%">\r\n.\\tclsh86\s..\\..\\tests\\all.tcl\s-file\s"cmdAH.*"\r\n\s\scmdAH-20.7.1\sFAILED\r\n\s\scmdAH-24.14.1\sFAILED\r\n\s\scmdAH-27.4.1\sFAILED\r\n\s\scmdAH-28.13.1\sFAILED\r\n\s\scmdAH-29.6.1\sFAILED\r\nTotal\s\s\s320\s\s\s\s\sPassed\s\s140\s\s\s\s\sSkipped\s175\s\s\s\s\sFailed\s\s5\r\n\r\n.\\tclsh86\s..\\..\\tests\\all.tcl\s-file\s"cmdAH.*"\s-tmpdir\s%TEMP%\r\nTotal\s\s\s320\s\s\s\s\sPassed\s\s145\s\s\s\s\sSkipped\s175\s\s\s\s\sFailed\s\s0\r\n</pre></code>
J foundin >=\s8.6
J is_private 0
J login sebres
J priority 5\sMedium
J resolution None
J severity Minor
J status Open
J submitter sebres
J subsystem 16.\sCommands\sA-H
J title win:\sstrange\sdiscrepancy\sregarding\sTcl_FSStat\s(all\sfile\ssub-commands\susing\sGetStatBuf)\scorresponding\spath\sby\s"built-in\sWindows\snames\swith\sdir\spath\sand\sextension"
J type Bug
K 525ccacaef84745d0a5ed72060f208626291077c
U sebres
Z 492b6910da8d918c3333eb8aec2b9190