summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-02-05 16:55:32 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-02-05 16:55:32 (GMT)
commit765de9e2ef4cdb43d97e28f02b2e0f6a1b981262 (patch)
treeceea26bd2c0c11ed71f7fb1e4f88b4d0adbe7632
parent7da7ccee61524b7d2392c3bd8b5cb11a448acf88 (diff)
parenteec7311e640b711577933860dec1c5cd2d2f59c6 (diff)
downloadtcl-765de9e2ef4cdb43d97e28f02b2e0f6a1b981262.zip
tcl-765de9e2ef4cdb43d97e28f02b2e0f6a1b981262.tar.gz
tcl-765de9e2ef4cdb43d97e28f02b2e0f6a1b981262.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--ChangeLog6
-rw-r--r--win/tclWinFile.c12
2 files changed, 18 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 747e1e8..3fa781c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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-02-05 Donal K. Fellows <dkf@users.sf.net>
* generic/tclLoadNone.c (TclpLoadMemory): [Bug 3433012]: Added dummy
diff --git a/win/tclWinFile.c b/win/tclWinFile.c
index 7224345..5717a3f 100644
--- a/win/tclWinFile.c
+++ b/win/tclWinFile.c
@@ -2570,6 +2570,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);
@@ -2712,6 +2718,12 @@ TclpObjNormalizePath(
Tcl_DStringAppend(&dsNorm, 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);