summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2012-08-21 16:35:20 (GMT)
committerdgp <dgp@users.sourceforge.net>2012-08-21 16:35:20 (GMT)
commit7d4e05824b97c9ea47add1149866767725a281f7 (patch)
tree3ce710acb9d9c47c4e48f80f5db03a1c86a1e9a6 /generic
parent56ab72d069fc6871ecfd285bb07e4670bcc5db4a (diff)
parentdbf049c0fba4506927b17c7ff9f7d66aa61cde18 (diff)
downloadtcl-7d4e05824b97c9ea47add1149866767725a281f7.zip
tcl-7d4e05824b97c9ea47add1149866767725a281f7.tar.gz
tcl-7d4e05824b97c9ea47add1149866767725a281f7.tar.bz2
merge trunk
Diffstat (limited to 'generic')
-rw-r--r--generic/tclPathObj.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c
index db07c0e..2b9ff87 100644
--- a/generic/tclPathObj.c
+++ b/generic/tclPathObj.c
@@ -1764,7 +1764,7 @@ Tcl_FSGetNormalizedPath(
*/
Tcl_Obj *dir, *copy;
- int cwdLen, pathType;
+ int tailLen, cwdLen, pathType;
pathType = Tcl_FSGetPathType(fsPathPtr->cwdPtr);
dir = Tcl_FSGetNormalizedPath(interp, fsPathPtr->cwdPtr);
@@ -1776,7 +1776,12 @@ Tcl_FSGetNormalizedPath(
UpdateStringOfFsPath(pathPtr);
}
- copy = AppendPath(dir, fsPathPtr->normPathPtr);
+ Tcl_GetStringFromObj(fsPathPtr->normPathPtr, &tailLen);
+ if (tailLen) {
+ copy = AppendPath(dir, fsPathPtr->normPathPtr);
+ } else {
+ copy = Tcl_DuplicateObj(dir);
+ }
Tcl_IncrRefCount(dir);
Tcl_IncrRefCount(copy);