diff options
author | dgp <dgp@users.sourceforge.net> | 2013-02-05 16:54:29 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2013-02-05 16:54:29 (GMT) |
commit | 7d50b7b1515618501f8eaf3d76ea80c6c796a87d (patch) | |
tree | 6d70584b762fe5b3a37dafa7840d3c86c61c2e4b | |
parent | ee3f25a10fee8fb2301a01194f6f73b949651986 (diff) | |
parent | a6ef761ef166016823f580363850ea3bc5e79459 (diff) | |
download | tcl-7d50b7b1515618501f8eaf3d76ea80c6c796a87d.zip tcl-7d50b7b1515618501f8eaf3d76ea80c6c796a87d.tar.gz tcl-7d50b7b1515618501f8eaf3d76ea80c6c796a87d.tar.bz2 |
[Bug 3603434] Make sure TclpObjNormalizePath() properly declares "a:/" to
be normalized, even when no "A:" drive is present on the system.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | win/tclWinFile.c | 12 |
2 files changed, 18 insertions, 0 deletions
@@ -1,3 +1,9 @@ +2013-02-05 Don Porter <dgp@users.sourceforge.net> + + * win/tclWinFile.c: [Bug 3603434] Make sure TclpObjNormalizePath() + properly declares "a:/" to be normalized, even when no "A:" drive is + present on the system. + 2013-01-30 Andreas Kupries <andreask@activestate.com> * library/platform/platform.tcl (::platform::LibcVersion): See diff --git a/win/tclWinFile.c b/win/tclWinFile.c index d1078f5..8ea6548 100644 --- a/win/tclWinFile.c +++ b/win/tclWinFile.c @@ -2335,6 +2335,12 @@ TclpObjNormalizePath(interp, pathPtr, nextCheckpoint) } Tcl_DStringAppend(&dsNorm, nativePath, len); lastValidPathEnd = currentPathEndPosition; + } else if (nextCheckpoint == 0) { + /* Path starts with a drive designation + * that's not actually on the system. + * We still must normalize up past the + * first separator. [Bug 3603434] */ + currentPathEndPosition++; } } Tcl_DStringFree(&ds); @@ -2417,6 +2423,12 @@ TclpObjNormalizePath(interp, pathPtr, nextCheckpoint) Tcl_DStringAppend(&dsNorm, nativePath, sizeof(WCHAR)*len); lastValidPathEnd = currentPathEndPosition; + } else if (nextCheckpoint == 0) { + /* Path starts with a drive designation + * that's not actually on the system. + * We still must normalize up past the + * first separator. [Bug 3603434] */ + currentPathEndPosition++; } } Tcl_DStringFree(&ds); |