diff options
Diffstat (limited to 'generic/tclPathObj.c')
-rw-r--r-- | generic/tclPathObj.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c index 6dd2f3f..88e49b5 100644 --- a/generic/tclPathObj.c +++ b/generic/tclPathObj.c @@ -921,7 +921,17 @@ Tcl_FSJoinPath( if (res != NULL) { TclDecrRefCount(res); } - return TclNewFSPathObj(elt, str, len); + + if (PATHFLAGS(elt)) { + return TclNewFSPathObj(elt, str, len); + } + if (TCL_PATH_ABSOLUTE != Tcl_FSGetPathType(elt)) { + return TclNewFSPathObj(elt, str, len); + } + (void) Tcl_FSGetNormalizedPath(NULL, elt); + if (elt == PATHOBJ(elt)->normPathPtr) { + return TclNewFSPathObj(elt, str, len); + } } } |