Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2026-05-18
10:34 • Ticket [e21fc32c2a] auto_execok does not check executability on Windows stat... artifact: 1f4af3f722 user: apnadkarni
2016-03-09
16:12 • Deleted ticket [e21fc32c2a]. artifact: c742f54a94 user: danckaert
2016-03-08
15:29
Proposed fix for [e21fc32c2aa]: auto_execok does not check executability on Windows closed check-in: 2f5431fd98 user: jan.nijtmans tags: bug-e21fc32c2aa
14:37 • Ticket [e21fc32c2a] auto_execok does not check executability on Windows stat... artifact: a9efb2a6cc user: danckaert
14:36 • Add attachment patch to ticket [e21fc32c2a] artifact: 6d00f20553 user: danckaert
14:35 • New ticket [e21fc32c2a] auto_execok does not check executability on Windows. artifact: 0a5740e08e user: danckaert

auto_execok does not check executability on Windows

Deletede21fc32c2aaa7cd019815dde0249386021f4c74dCreated 11 years agoUpdated 198 days ago
Descriptionwiki2016-03-08 14:35:59
On Windows, [auto_execok] lies when there is a (non-executable) file without extension next to the same file with .exe extension. For example, when the current directory contains "foo" and "foo.exe", [auto_execok foo] will return "foo". This can be fixed by checking for executability before returning. This was probably not done in the past because [file executable] was not reliable on Windows. However, these issues were fixed in http://core.tcl.tk/tcl/info/23cc9bf170fd4489. So I think [file executable] can now safely be used in [auto_execok].
danckaertwiki2016-03-08 14:37:53

I've attached a patch to fix this.

danckaertplain2016-03-09 16:12:33
Sorry, apparently [file executable] only checks the file extension, which is not sufficient either. Furthermore, there are other issues with auto_execok. So forget this patch. I will delete this ticket and create another one instead.
apnadkarnimarkdown2026-05-18 10:34:26

Needs a two-part fix. One is partly fixed in TIP 753. Other part pending is file executable.

Log in (anonymous is fine) to add a comment.