summaryrefslogtreecommitdiffstats
path: root/generic/tclPathObj.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclPathObj.c')
-rw-r--r--generic/tclPathObj.c12
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);
+ }
}
}