summaryrefslogtreecommitdiffstats
path: root/win/tclWinFile.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-02-05 16:56:01 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-02-05 16:56:01 (GMT)
commita3bfe4a297587de13ae555332bb6180a193098c9 (patch)
tree41fdcdc8c902b83d6d8fc6ac1e52a5df7faf8aba /win/tclWinFile.c
parent8941b209b0188f101901cd0ffb32a97d7d293f82 (diff)
parent593462fc80d3e1a4684644f3237115112131f83f (diff)
downloadtcl-a3bfe4a297587de13ae555332bb6180a193098c9.zip
tcl-a3bfe4a297587de13ae555332bb6180a193098c9.tar.gz
tcl-a3bfe4a297587de13ae555332bb6180a193098c9.tar.bz2
[Bug 3603434] Make sure TclpObjNormalizePath() properly declares "a:/" to
be normalized, even when no "A:" drive is present on the system.
Diffstat (limited to 'win/tclWinFile.c')
-rw-r--r--win/tclWinFile.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/win/tclWinFile.c b/win/tclWinFile.c
index 19e6abd..c526eb9 100644
--- a/win/tclWinFile.c
+++ b/win/tclWinFile.c
@@ -2476,6 +2476,12 @@ TclpObjNormalizePath(
}
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);
@@ -2616,6 +2622,12 @@ TclpObjNormalizePath(
(const char *)nativePath,
(int)(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);