summaryrefslogtreecommitdiffstats
path: root/generic/tclPathObj.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2011-08-16 09:18:06 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2011-08-16 09:18:06 (GMT)
commit1fb25505b732b94f74aae7edc392508bdd8a30fa (patch)
tree6d0803a80ce796b40f3601e4c6da7b561ad57f30 /generic/tclPathObj.c
parent860e6b5e43e0ac7e673218dd929d425c5d206014 (diff)
parent1be9bc0869341de7806f25de58a35e8320b42ee5 (diff)
downloadtcl-1fb25505b732b94f74aae7edc392508bdd8a30fa.zip
tcl-1fb25505b732b94f74aae7edc392508bdd8a30fa.tar.gz
tcl-1fb25505b732b94f74aae7edc392508bdd8a30fa.tar.bz2
merge current trunk
Diffstat (limited to 'generic/tclPathObj.c')
-rw-r--r--generic/tclPathObj.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c
index d9e3973..205c301 100644
--- a/generic/tclPathObj.c
+++ b/generic/tclPathObj.c
@@ -2617,29 +2617,29 @@ DupFsPathInternalRep(
SETPATHOBJ(copyPtr, copyFsPathPtr);
- if (srcFsPathPtr->translatedPathPtr != NULL) {
+ if (srcFsPathPtr->translatedPathPtr == srcPtr) {
+ /* Cycle in src -> make cycle in copy. */
+ copyFsPathPtr->translatedPathPtr = copyPtr;
+ } else {
copyFsPathPtr->translatedPathPtr = srcFsPathPtr->translatedPathPtr;
- if (copyFsPathPtr->translatedPathPtr != copyPtr) {
+ if (copyFsPathPtr->translatedPathPtr != NULL) {
Tcl_IncrRefCount(copyFsPathPtr->translatedPathPtr);
}
- } else {
- copyFsPathPtr->translatedPathPtr = NULL;
}
- if (srcFsPathPtr->normPathPtr != NULL) {
+ if (srcFsPathPtr->normPathPtr == srcPtr) {
+ /* Cycle in src -> make cycle in copy. */
+ copyFsPathPtr->normPathPtr = copyPtr;
+ } else {
copyFsPathPtr->normPathPtr = srcFsPathPtr->normPathPtr;
- if (copyFsPathPtr->normPathPtr != copyPtr) {
+ if (copyFsPathPtr->normPathPtr != NULL) {
Tcl_IncrRefCount(copyFsPathPtr->normPathPtr);
}
- } else {
- copyFsPathPtr->normPathPtr = NULL;
}
- if (srcFsPathPtr->cwdPtr != NULL) {
- copyFsPathPtr->cwdPtr = srcFsPathPtr->cwdPtr;
+ copyFsPathPtr->cwdPtr = srcFsPathPtr->cwdPtr;
+ if (copyFsPathPtr->cwdPtr != NULL) {
Tcl_IncrRefCount(copyFsPathPtr->cwdPtr);
- } else {
- copyFsPathPtr->cwdPtr = NULL;
}
copyFsPathPtr->flags = srcFsPathPtr->flags;