summaryrefslogtreecommitdiffstats
path: root/generic/tclPathObj.c
diff options
context:
space:
mode:
authorvincentdarley <vincentdarley>2003-11-24 10:13:36 (GMT)
committervincentdarley <vincentdarley>2003-11-24 10:13:36 (GMT)
commit9b685dfb73cdf1260d125dc254daf63a294e0687 (patch)
tree8c75bb5584759e3d887dcab8e7249ba62634b0b2 /generic/tclPathObj.c
parent02e16cc061e4a3b26a4a8c634359348d4b54b51c (diff)
downloadtcl-9b685dfb73cdf1260d125dc254daf63a294e0687.zip
tcl-9b685dfb73cdf1260d125dc254daf63a294e0687.tar.gz
tcl-9b685dfb73cdf1260d125dc254daf63a294e0687.tar.bz2
remove windows [cd] bug
Diffstat (limited to 'generic/tclPathObj.c')
-rw-r--r--generic/tclPathObj.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c
index be3ac61..40570aa 100644
--- a/generic/tclPathObj.c
+++ b/generic/tclPathObj.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclPathObj.c,v 1.13 2003/11/03 12:49:11 vincentdarley Exp $
+ * RCS: @(#) $Id: tclPathObj.c,v 1.14 2003/11/24 10:13:36 vincentdarley Exp $
*/
#include "tclInt.h"
@@ -1266,15 +1266,22 @@ Tcl_FSGetNormalizedPath(interp, pathObjPtr)
}
if (drive[0] == drive_c) {
absolutePath = Tcl_DuplicateObj(useThisCwd);
- Tcl_IncrRefCount(absolutePath);
- Tcl_AppendToObj(absolutePath, "/", 1);
- Tcl_AppendToObj(absolutePath, path+2, -1);
/* We have a refCount on the cwd */
} else {
- /* We just can't handle it correctly here */
Tcl_DecrRefCount(useThisCwd);
useThisCwd = NULL;
+ /*
+ * The path is not in the current drive, but
+ * is volume-relative. The way Tcl 8.3 handles
+ * this is that it treats such a path as
+ * relative to the root of the drive. We
+ * therefore behave the same here.
+ */
+ absolutePath = Tcl_NewStringObj(path, 2);
}
+ Tcl_IncrRefCount(absolutePath);
+ Tcl_AppendToObj(absolutePath, "/", 1);
+ Tcl_AppendToObj(absolutePath, path+2, -1);
}
#endif /* __WIN32__ */
}