summaryrefslogtreecommitdiffstats
path: root/generic/tclPathObj.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-10-17 13:52:24 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-10-17 13:52:24 (GMT)
commita9804776bdfcb5ebbddabaac09423e630f6c6452 (patch)
tree118f7c7682cdbaf9666f25c8fae9b7e912d55892 /generic/tclPathObj.c
parentef03a2c7809309b2255f7c82c6abe0db2e4160bf (diff)
parent4bb1f92d128bf8ca978c59204d2636685d13e769 (diff)
downloadtcl-a9804776bdfcb5ebbddabaac09423e630f6c6452.zip
tcl-a9804776bdfcb5ebbddabaac09423e630f6c6452.tar.gz
tcl-a9804776bdfcb5ebbddabaac09423e630f6c6452.tar.bz2
merge trunk
Diffstat (limited to 'generic/tclPathObj.c')
-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);