summaryrefslogtreecommitdiffstats
path: root/generic/tclPathObj.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2017-12-06 13:06:47 (GMT)
committerdgp <dgp@users.sourceforge.net>2017-12-06 13:06:47 (GMT)
commitd7ed3259130eb94a7050d2d66b99c997378c969d (patch)
treecf03bb908666efe67a261850c6f156450af44857 /generic/tclPathObj.c
parent72f0f0b3468809e3a3a26e448b3bd3be8a8398a6 (diff)
parent07aa7381a974c339325fff3c7ab509c73d1fd2e2 (diff)
downloadtcl-d7ed3259130eb94a7050d2d66b99c997378c969d.zip
tcl-d7ed3259130eb94a7050d2d66b99c997378c969d.tar.gz
tcl-d7ed3259130eb94a7050d2d66b99c997378c969d.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 49d62dc..2453c46 100644
--- a/generic/tclPathObj.c
+++ b/generic/tclPathObj.c
@@ -1809,7 +1809,6 @@ Tcl_FSGetNormalizedPath(
*/
(void) TclGetStringFromObj(dir, &cwdLen);
- cwdLen += (Tcl_GetString(copy)[cwdLen] == '/');
/* Normalize the combined string. */
@@ -1831,12 +1830,12 @@ Tcl_FSGetNormalizedPath(
* 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 already pointing at
+ * 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. */