Ticket UUID: | 7677029cd9113c6343aeb9d5cabbaf690b0edc00 | |||
Title: | leftover use of tilde in filename string | |||
Type: | Bug | Version: | 9.0 | |
Submitter: | msoyka | Created on: | 2024-10-27 23:40:49 | |
Subsystem: | 85. Win Build | Assigned To: | jan.nijtmans | |
Priority: | 5 Medium | Severity: | Minor | |
Status: | Closed | Last Modified: | 2024-10-30 10:25:05 | |
Resolution: | Fixed | Closed By: | jan.nijtmans | |
Closed on: | 2024-10-30 10:25:05 | |||
Description: |
The string "~/wishrc.tcl" is used to initialize the Tcl variable "tcl_rcFileName" but the tilde character in filenames is not supported in version 9. The code in question is in the file win/winMain.c near line 287. | |||
User Comments: |
jan.nijtmans added on 2024-10-30 10:25:05:
Now merge to trunk and core-8-branch. Makes no sense for 8.6. oehhar added on 2024-10-30 07:39:49: That is great news, thank you. Jan, will you merge the patch or shall I care ? I don't see any objections, as it is basically the same as TCL. This will be in 9.0.1 patch release. Release process starts in December... Thanks for all, Harald msoyka added on 2024-10-29 20:20:46: I downloaded the zip-file tk-b77c2873.zip, rebuilt Tk and can verify that the file wishrc.tcl is sourced as expected. oehhar added on 2024-10-29 06:48:18: Great, thanks Jan. Michael, could you confirm that the bugfix branch works for you ? I would appreciate the test! Thank you and take care, Harald jan.nijtmans added on 2024-10-28 20:06:32: @harald, good suggestion! See [b77c2873ada7b671] oehhar added on 2024-10-28 08:12:47: This is similar to ticket [fcfddc9f]. The following info is copied from there: The relevant line is line 286 of win\winMain.c. Tcl_ObjSetVar2(interp, Tcl_NewStringObj("tcl_rcFileName", -1), NULL, Tcl_NewStringObj("~/.wishrc", -1), TCL_GLOBAL_ONLY); The same is in unix\tkAppInit.c line 189 The file is later taken in TCL file tclMain.c line 228 and passed to Tcl_TranslateFileName. Well, TCL is solving this issue by using the script level, see tclAppInit.c line 167: (void) Tcl_EvalEx(interp, "set tcl_rcFileName [file tildeexpand ~/" INITFILENAME "]", -1, TCL_EVAL_GLOBAL); So, this might be the solution for Tk too. Take care, Harald |
