diff options
author | apnadkarni <apnmbx-wits@yahoo.com> | 2022-07-08 13:48:36 (GMT) |
---|---|---|
committer | apnadkarni <apnmbx-wits@yahoo.com> | 2022-07-08 13:48:36 (GMT) |
commit | 3674905dbda8443171db562a6c69bf50228f18fb (patch) | |
tree | bfc36de043daea5774bd0739eb719e86314e23e5 /unix/tclUnixInit.c | |
parent | 9336a020ee8538c5927e9cbe8cbad80ef915c741 (diff) | |
download | tcl-3674905dbda8443171db562a6c69bf50228f18fb.zip tcl-3674905dbda8443171db562a6c69bf50228f18fb.tar.gz tcl-3674905dbda8443171db562a6c69bf50228f18fb.tar.bz2 |
Resolve ~ for MacOS during initialization
Diffstat (limited to 'unix/tclUnixInit.c')
-rw-r--r-- | unix/tclUnixInit.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/unix/tclUnixInit.c b/unix/tclUnixInit.c index 9d84a21..50befc3 100644 --- a/unix/tclUnixInit.c +++ b/unix/tclUnixInit.c @@ -865,15 +865,13 @@ TclpSetVariables( #ifndef TCL_TILDE_EXPAND { - Tcl_Obj *resolvedPaths = - TclResolveTildePaths(interp, - Tcl_GetVar2Ex( - interp, - "tcl_pkgPath", - NULL, - TCL_GLOBAL_ONLY)); - if (resolvedPaths) { - Tcl_SetVar2Ex(interp, "tcl_pkgPath", NULL, resolvedPaths, TCL_GLOBAL_ONLY); + Tcl_Obj *origPaths; + Tcl_Obj *resolvedPaths; + origPaths = Tcl_GetVar2Ex(interp, "tcl_pkgPath", NULL, TCL_GLOBAL_ONLY); + resolvedPaths = TclResolveTildePathList(origPaths); + if (resolvedPaths != origPaths && resolvedPaths != NULL) { + Tcl_SetVar2Ex(interp, "tcl_pkgPath", NULL, + resolvedPaths, TCL_GLOBAL_ONLY); } } #endif |