Artifacts Associated With Ticket 85d1fa7d07de7c86
Ticket change [13f25d3297] (rid 193499) by thegavaguy on 2021-04-09 19:15:36:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
This is essentially a minor code cleanup issue. There is no user-visible error, just a bit of unneeded extra processing time. NativeIsExec() in win/tclWinFile.c contains the following: if ((_wcsicmp(path, L"exe") == 0) || (_wcsicmp(path, L"com") == 0) || (_wcsicmp(path, L"cmd") == 0) || (_wcsicmp(path, L"cmd") == 0) || (_wcsicmp(path, L"bat") == 0)) { It unnecessarily checks for a ".cmd" extension twice. Just delete one of them to correct this. Note that earlier versions of this function checked for ".ps1" (Powershell scripts) where the second ".cmd" is now located. The commit from 2018-03-22 (da169b16 in the repo on GitHub) seems to be the last one like that. The next commit affecting tclWinFile.c, from 2018-04-30, (19642193 on GitHub) has two checks for ".cmd", although it is still using the Microsoft macro _tcsicmp and TEXT macro to allow switching between Unicode and ASCII. Since versions of Windows descended from Win95 are no longer supported by Tcl this was later simplified and the current version simply uses _wcsicmp(). All subsequent versions of tclWinFile.c have contained this duplicate check for ".cmd". [Sorry for the Git commit IDs, I have not yet installed fossil on my system.] I can't tell whether this might be an edit artefact or a merge artefact or something else, but in any case the fix is trival. - foundin initialized to: "8.6.11"
- is_private initialized to: "0"
- login: "thegavaguy"
- priority initialized to: "5 Medium"
- private_contact initialized to: "ad6a6aa0fafa585dc8ffad3abcdfbc4f54bd2985"
- resolution initialized to: "None"
- severity initialized to: "Minor"
- status initialized to: "Open"
- submitter initialized to: "thegavaguy"
- subsystem initialized to: "16. Commands A-H"
- title initialized to:
Duplicate file extension check in [file executable] on Windows
- type initialized to: "Bug"
Ticket change [37f5ff3dbd] (rid 193713) by jan.nijtmans on 2021-04-15 09:12:37:
- assignee changed to: "jan.nijtmans"
- closedate changed to: "2459319.88376324"
- closer changed to: "jan.nijtmans"
- icomment:
Fixed in all branches now. It looks like "ps1" (in Tcl 8.5 only) was a mistake, I just removed it there. Otherwise someone would have filed a bug report for 8.6 already.
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Fixed"
- status changed to: "Closed"