summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2017-05-01 20:23:28 (GMT)
committerdgp <dgp@users.sourceforge.net>2017-05-01 20:23:28 (GMT)
commitc0108dceb13e2079a9a4b662d98fa27a8c5d13c0 (patch)
treebea537c1c3524b7a1e64d63515d78dfcdd37f7d7 /generic
parenta291109ed2c14d7a263b8b8132e2688266223c97 (diff)
downloadtcl-c0108dceb13e2079a9a4b662d98fa27a8c5d13c0.zip
tcl-c0108dceb13e2079a9a4b662d98fa27a8c5d13c0.tar.gz
tcl-c0108dceb13e2079a9a4b662d98fa27a8c5d13c0.tar.bz2
[f9fe90d0fa] [file join] normalization. See filesystem-1.52*
Diffstat (limited to 'generic')
-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);
+ }
}
}