summaryrefslogtreecommitdiffstats
path: root/generic/tclPathObj.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2017-12-06 13:02:32 (GMT)
committerdgp <dgp@users.sourceforge.net>2017-12-06 13:02:32 (GMT)
commitbb1c5fe83355d454d63db62da5797204c6cec06e (patch)
treecded73e2ddac2549f36cbe5081cee0d3869193ec /generic/tclPathObj.c
parent3eef9fcea1274b68161aa2c5ebfb6a975ac7143a (diff)
downloadtcl-bb1c5fe83355d454d63db62da5797204c6cec06e.zip
tcl-bb1c5fe83355d454d63db62da5797204c6cec06e.tar.gz
tcl-bb1c5fe83355d454d63db62da5797204c6cec06e.tar.bz2
[ce3a211dcb] Failed file normalize when tail is empty string.
Diffstat (limited to 'generic/tclPathObj.c')
-rw-r--r--generic/tclPathObj.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c
index a306853..87ddfb7 100644
--- a/generic/tclPathObj.c
+++ b/generic/tclPathObj.c
@@ -1869,7 +1869,6 @@ Tcl_FSGetNormalizedPath(
*/
(void) Tcl_GetStringFromObj(dir, &cwdLen);
- cwdLen += (Tcl_GetString(copy)[cwdLen] == '/');
/* Normalize the combined string. */
@@ -1890,13 +1889,13 @@ Tcl_FSGetNormalizedPath(
* to a normalized head, we can more efficiently normalize the
* combined path by passing over only the unnormalized tail
* portion. When this is sufficient, prior developers claim
- * this should be much faster. We use 'cwdLen-1' so that we are
+ * this should be much faster. We use 'cwdLen' so that we are
* already pointing at the dir-separator that we know about.
* The normalization code will actually start off directly
* after that separator.
*/
- TclFSNormalizeToUniquePath(interp, copy, cwdLen-1);
+ TclFSNormalizeToUniquePath(interp, copy, cwdLen);
}
/* Now we need to construct the new path object. */