|
2026-05-18
| ||
| 10:28 | • Closed ticket [1244733fff]: auto_execok can return relative path names plus ... artifact: e4d4aa7e60 user: apnadkarni | |
|
2005-11-02
| ||
| 01:57 | • Ticket [1244733fff]: 4 changes artifact: dfac2b4fa8 user: dgp | |
|
2005-07-25
| ||
| 19:33 | • New ticket [1244733fff]. artifact: 8fce183b80 user: techentin | |
auto_execok can return relative path names
Closed / Fixed1244733fffffffffffffffffffffffffffffffffCreated 21 years agoUpdated 199 days ago
Descriptionplain2005-07-25 19:33:25
auto_execok can return relative path names. On Windows, "." is one of the standard search directories. And on Unix, empty directories in the path are treated as ".". In these cases, [file executable] is successful, and auto_execok returns something like "./myfile" It works fine until your application changes working directory. Then relative path names are broken. Perhaps auto_execok should use [file normalize] before returning.
dgpplain2005-11-02 01:57:39
Logged In: YES user_id=80530 Since the purpose of [auto_execok] is to return something suitable for passing to [exec], applying [file normalize] to the return value can only make things more robust. So, I think this is a good idea. One wrinkle in the plan is that [file normalize] isn't present in safe interps. Another issue is that freewrap seems to have issues with [file normalize] (see 1072136) if someone can resolve those issues, we can move forward with this.
apnadkarniplain2026-05-18 10:28:52
Fixed for 9.1 in TIP 753 commit [de961e8d](https://core.tcl-lang.org/tcl/info/de961e8dee5470e6). Paths are not cached - see the TIP and discussion. Tested in `auto_execok-win-6.1`.
Log in (anonymous is fine) to add a comment.