diff options
author | vincentdarley <vincentdarley@noemail.net> | 2003-10-03 17:45:36 (GMT) |
---|---|---|
committer | vincentdarley <vincentdarley@noemail.net> | 2003-10-03 17:45:36 (GMT) |
commit | 5f3d4f86060e3beaffdbe57df79b219a56a78d43 (patch) | |
tree | 60e58def2b9c6ca8559eb36ce4d18dcb276d6fe3 /generic/tclFileName.c | |
parent | 6d5ce5fda4be85b72bc287cbc814894bb5026e2e (diff) | |
download | tcl-5f3d4f86060e3beaffdbe57df79b219a56a78d43.zip tcl-5f3d4f86060e3beaffdbe57df79b219a56a78d43.tar.gz tcl-5f3d4f86060e3beaffdbe57df79b219a56a78d43.tar.bz2 |
backporting of filesystem tests, docs
FossilOrigin-Name: 9cc6cd11c033e2c40d3aba0f11cb4f1ce995b1cb
Diffstat (limited to 'generic/tclFileName.c')
-rw-r--r-- | generic/tclFileName.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/generic/tclFileName.c b/generic/tclFileName.c index ea7ee05..be689af 100644 --- a/generic/tclFileName.c +++ b/generic/tclFileName.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclFileName.c,v 1.40.2.3 2003/07/17 00:16:04 hobbs Exp $ + * RCS: @(#) $Id: tclFileName.c,v 1.40.2.4 2003/10/03 17:45:37 vincentdarley Exp $ */ #include "tclInt.h" @@ -1380,16 +1380,17 @@ Tcl_TranslateFileName(interp, name, bufferPtr) * with name after tilde substitution. */ { Tcl_Obj *path = Tcl_NewStringObj(name, -1); - CONST char *result; + Tcl_Obj *transPtr; Tcl_IncrRefCount(path); - result = Tcl_FSGetTranslatedStringPath(interp, path); - if (result == NULL) { + transPtr = Tcl_FSGetTranslatedPath(interp, path); + if (transPtr == NULL) { Tcl_DecrRefCount(path); return NULL; } + Tcl_DStringInit(bufferPtr); - Tcl_DStringAppend(bufferPtr, result, -1); + Tcl_DStringAppend(bufferPtr, Tcl_GetString(transPtr), -1); Tcl_DecrRefCount(path); /* |