diff options
author | dgp <dgp@users.sourceforge.net> | 2017-05-01 20:25:03 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2017-05-01 20:25:03 (GMT) |
commit | cfdf3d1f29001198f2afdea91a595527acdc2802 (patch) | |
tree | f1f237860cddc62d0bd939d7c5272cde05c048e9 /generic | |
parent | b396b6e2533e98a2733a3fa471766e98c2d55088 (diff) | |
parent | c0108dceb13e2079a9a4b662d98fa27a8c5d13c0 (diff) | |
download | tcl-cfdf3d1f29001198f2afdea91a595527acdc2802.zip tcl-cfdf3d1f29001198f2afdea91a595527acdc2802.tar.gz tcl-cfdf3d1f29001198f2afdea91a595527acdc2802.tar.bz2 |
[f9fe90d0fa] [file join] normalization. See filesystem-1.52*
Diffstat (limited to 'generic')
-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 20f41a3..31ed68e 100644 --- a/generic/tclPathObj.c +++ b/generic/tclPathObj.c @@ -921,7 +921,17 @@ TclJoinPath( 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); + } } } |