diff options
| author | dgp <dgp@users.sourceforge.net> | 2017-12-06 13:05:51 (GMT) |
|---|---|---|
| committer | dgp <dgp@users.sourceforge.net> | 2017-12-06 13:05:51 (GMT) |
| commit | 07aa7381a974c339325fff3c7ab509c73d1fd2e2 (patch) | |
| tree | be267ff1dce0823fd826212740ca7d3404039999 /generic/tclPathObj.c | |
| parent | f3af86c67e61eaba34af3d25e883ae3e9fc83099 (diff) | |
| parent | bb1c5fe83355d454d63db62da5797204c6cec06e (diff) | |
| download | tcl-07aa7381a974c339325fff3c7ab509c73d1fd2e2.zip tcl-07aa7381a974c339325fff3c7ab509c73d1fd2e2.tar.gz tcl-07aa7381a974c339325fff3c7ab509c73d1fd2e2.tar.bz2 | |
[ce3a211dcb] Failed file normalize when tail is empty string.
Diffstat (limited to 'generic/tclPathObj.c')
| -rw-r--r-- | generic/tclPathObj.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c index 8ee4869..29d6f96 100644 --- a/generic/tclPathObj.c +++ b/generic/tclPathObj.c @@ -1811,7 +1811,6 @@ Tcl_FSGetNormalizedPath( */ (void) Tcl_GetStringFromObj(dir, &cwdLen); - cwdLen += (Tcl_GetString(copy)[cwdLen] == '/'); /* Normalize the combined string. */ @@ -1833,12 +1832,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. */ |
