From c177e42a7c05d97d15d2b710a36a38f2ca1b7ca5 Mon Sep 17 00:00:00 2001 From: vasiljevic Date: Wed, 17 Dec 2003 09:32:35 +0000 Subject: Merged fixes for Tcl Bug #839519 and Tcl Bug #861515. Those are already applied to the head. --- generic/tclIOUtil.c | 25 ++++++++++++++----------- 1 file 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; -- cgit v0.12