Ticket UUID: | e21fc32c2aaa7cd019815dde0249386021f4c74d | |||
Title: | auto_execok does not check executability on Windows | |||
Type: | Patch | Version: | 8.6.5 | |
Submitter: | danckaert | Created on: | 2016-03-08 14:35:59 | |
Subsystem: | 38. Init - Library - Autoload | Assigned To: | nobody | |
Priority: | 5 Medium | Severity: | Minor | |
Status: | Deleted | Last Modified: | 2016-03-09 16:12:33 | |
Resolution: | None | Closed By: | danckaert | |
Closed on: | 2016-03-09 16:12:33 | |||
Description: |
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]. | |||
User Comments: |
danckaert added on 2016-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. danckaert added on 2016-03-08 14:37:53: I've attached a patch to fix this. |
Attachments:
- patch [download] added by danckaert on 2016-03-08 14:36:53. [details]