summaryrefslogtreecommitdiffstats
path: root/generic/tclIOUtil.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclIOUtil.c')
-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;