summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvasiljevic <zv@archiware.com>2003-12-17 09:32:35 (GMT)
committervasiljevic <zv@archiware.com>2003-12-17 09:32:35 (GMT)
commite6755ddde4faa78aa7f831e7be20021a2ea1565a (patch)
tree5e34991c51f4911b00b500e88aa08e599be13c5a
parenta66b2e3e357d9ae474819710a99a0a12afbf3a79 (diff)
downloadtcl-e6755ddde4faa78aa7f831e7be20021a2ea1565a.zip
tcl-e6755ddde4faa78aa7f831e7be20021a2ea1565a.tar.gz
tcl-e6755ddde4faa78aa7f831e7be20021a2ea1565a.tar.bz2
Merged fixes for Tcl Bug #839519 and Tcl Bug #861515.
Those are already applied to the head.
-rw-r--r--generic/tclIOUtil.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c
index de12596..3dcb564 100644
--- a/generic/tclIOUtil.c
+++ b/generic/tclIOUtil.c
@@ -17,7 +17,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclIOUtil.c,v 1.77.2.12 2003/11/20 19:05:44 vincentdarley Exp $
+ * RCS: @(#) $Id: tclIOUtil.c,v 1.77.2.13 2003/12/17 09:32:35 vasiljevic Exp $
*/
#include "tclInt.h"
@@ -499,7 +499,7 @@ typedef struct ThreadSpecificData {
FilesystemRecord *filesystemList;
} ThreadSpecificData;
-Tcl_ThreadDataKey dataKey;
+static Tcl_ThreadDataKey dataKey;
/*
* Declare fallback support function and
@@ -2509,7 +2509,8 @@ Tcl_FSGetCwd(interp)
* we'll always be in the 'else' branch below which
* is simpler.
*/
- FsUpdateCwd(norm);
+ FsUpdateCwd(norm);
+ Tcl_DecrRefCount(norm);
}
Tcl_DecrRefCount(retVal);
}
@@ -2555,6 +2556,7 @@ Tcl_FSGetCwd(interp)
Tcl_DecrRefCount(norm);
} else {
FsUpdateCwd(norm);
+ Tcl_DecrRefCount(norm);
}
Tcl_DecrRefCount(retVal);
} else {
@@ -5263,15 +5265,16 @@ Tcl_FSGetTranslatedPath(interp, pathPtr)
srcFsPathPtr = (FsPath*) PATHOBJ(pathPtr);
if (srcFsPathPtr->translatedPathPtr == NULL) {
if (PATHFLAGS(pathPtr) != 0) {
- return Tcl_FSGetNormalizedPath(interp, pathPtr);
+ retObj = Tcl_FSGetNormalizedPath(interp, pathPtr);
+ } else {
+ /*
+ * It is a pure absolute, normalized path object.
+ * This is something like being a 'pure list'. The
+ * object's string, translatedPath and normalizedPath
+ * are all identical.
+ */
+ retObj = srcFsPathPtr->normPathPtr;
}
- /*
- * It is a pure absolute, normalized path object.
- * This is something like being a 'pure list'. The
- * object's string, translatedPath and normalizedPath
- * are all identical.
- */
- retObj = srcFsPathPtr->normPathPtr;
} else {
/* It is an ordinary path object */
retObj = srcFsPathPtr->translatedPathPtr;