From a291109ed2c14d7a263b8b8132e2688266223c97 Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 28 Apr 2017 17:49:43 +0000 Subject: [f34cf83dd0] An optimization was being taken in a case where it produced the wrong result, failing to collapse multiple /// into /. Testing on Windows where path expectations may vary would be a good idea, but since this is just an optimization avoidance, I suspect we're ok. --- generic/tclPathObj.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c index 95c57bf..6dd2f3f 100644 --- a/generic/tclPathObj.c +++ b/generic/tclPathObj.c @@ -948,6 +948,7 @@ Tcl_FSJoinPath( } } strElt = Tcl_GetStringFromObj(elt, &strEltLen); + driveNameLength = 0; type = TclGetPathType(elt, &fsPtr, &driveNameLength, &driveName); if (type != TCL_PATH_RELATIVE) { /* @@ -1003,6 +1004,12 @@ Tcl_FSJoinPath( } } ptr = strElt; + /* [Bug f34cf83dd0] */ + if (driveNameLength > 0) { + if (ptr[0] == '/' && ptr[-1] == '/') { + goto noQuickReturn; + } + } while (*ptr != '\0') { if (*ptr == '/' && (ptr[1] == '/' || ptr[1] == '\0')) { /* -- cgit v0.12