Skip to content
Tcl Source Code Artifact [13f25d3297]
Login

Artifact [13f25d3297]

Artifact 13f25d329748f89c0f891f565ffe937a91493682b07a3157d1f258b3f81a3db0:

Ticket change [13f25d3297] - New ticket [85d1fa7d07de7c86|85d1fa7d07] <i>Duplicate file extension check in [file executable] on Windows</i>. by thegavaguy on 2021-04-09 19:15:36.
D 2021-04-09T19:15:36.272
J assignee nobody
J closer nobody
J cmimetype text/plain
J comment This\sis\sessentially\sa\sminor\scode\scleanup\sissue.\s\sThere\sis\sno\r\nuser-visible\serror,\sjust\sa\sbit\sof\sunneeded\sextra\sprocessing\stime.\r\n\r\nNativeIsExec()\sin\swin/tclWinFile.c\scontains\sthe\sfollowing:\r\n\r\n\s\s\s\sif\s((_wcsicmp(path,\sL"exe")\s==\s0)\r\n\s\s\s\s\s\s\s\s||\s(_wcsicmp(path,\sL"com")\s==\s0)\r\n\s\s\s\s\s\s\s\s||\s(_wcsicmp(path,\sL"cmd")\s==\s0)\r\n\s\s\s\s\s\s\s\s||\s(_wcsicmp(path,\sL"cmd")\s==\s0)\r\n\s\s\s\s\s\s\s\s||\s(_wcsicmp(path,\sL"bat")\s==\s0))\s{\r\n\r\nIt\sunnecessarily\schecks\sfor\sa\s".cmd"\sextension\stwice.\s\sJust\sdelete\sone\r\nof\sthem\sto\scorrect\sthis.\r\n\r\nNote\sthat\searlier\sversions\sof\sthis\sfunction\schecked\sfor\s".ps1"\r\n(Powershell\sscripts)\swhere\sthe\ssecond\s".cmd"\sis\snow\slocated.\s\sThe\scommit\r\nfrom\s2018-03-22\s(da169b16\sin\sthe\srepo\son\sGitHub)\sseems\sto\sbe\sthe\slast\r\none\slike\sthat.\s\sThe\snext\scommit\saffecting\stclWinFile.c,\sfrom\s2018-04-30,\r\n(19642193\son\sGitHub)\shas\stwo\schecks\sfor\s".cmd",\salthough\sit\sis\sstill\r\nusing\sthe\sMicrosoft\smacro\s_tcsicmp\sand\sTEXT\smacro\sto\sallow\sswitching\r\nbetween\sUnicode\sand\sASCII.\sSince\sversions\sof\sWindows\sdescended\sfrom\r\nWin95\sare\sno\slonger\ssupported\sby\sTcl\sthis\swas\slater\ssimplified\sand\sthe\r\ncurrent\sversion\ssimply\suses\s_wcsicmp().\s\sAll\ssubsequent\sversions\sof\r\ntclWinFile.c\shave\scontained\sthis\sduplicate\scheck\sfor\s".cmd".\r\n\r\n[Sorry\sfor\sthe\sGit\scommit\sIDs,\sI\shave\snot\syet\sinstalled\sfossil\son\smy\r\nsystem.]\r\n\r\nI\scan't\stell\swhether\sthis\smight\sbe\san\sedit\sartefact\sor\sa\smerge\r\nartefact\sor\ssomething\selse,\sbut\sin\sany\scase\sthe\sfix\sis\strival.
J foundin 8.6.11
J is_private 0
J login thegavaguy
J priority 5\sMedium
J private_contact ad6a6aa0fafa585dc8ffad3abcdfbc4f54bd2985
J resolution None
J severity Minor
J status Open
J submitter thegavaguy
J subsystem 16.\sCommands\sA-H
J title Duplicate\sfile\sextension\scheck\sin\s[file\sexecutable]\son\sWindows
J type Bug
K 85d1fa7d07de7c86f0dd8165569d5ee5045283dc
U thegavaguy
Z 1563bc74e0a2d62661fc7ea1dae36474