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 /unix/tclUnixFile.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 'unix/tclUnixFile.c')
-rw-r--r-- | unix/tclUnixFile.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/unix/tclUnixFile.c b/unix/tclUnixFile.c index 3e74d16..fe9f067 100644 --- a/unix/tclUnixFile.c +++ b/unix/tclUnixFile.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixFile.c,v 1.32 2003/02/12 18:57:52 vincentdarley Exp $ + * RCS: @(#) $Id: tclUnixFile.c,v 1.32.2.1 2003/10/03 17:45:37 vincentdarley Exp $ */ #include "tclInt.h" @@ -255,7 +255,8 @@ TclpMatchInDirectory(interp, resultPtr, pathPtr, pattern, types) dirLength++; } } - + Tcl_DecrRefCount(fileNamePtr); + /* * Now open the directory for reading and iterate over the contents. */ @@ -745,10 +746,14 @@ TclpObjLink(pathPtr, toPtr, linkAction) char link[MAXPATHLEN]; int length; Tcl_DString ds; - - if (Tcl_FSGetTranslatedPath(NULL, pathPtr) == NULL) { + Tcl_Obj *transPtr; + + transPtr = Tcl_FSGetTranslatedPath(NULL, pathPtr); + if (transPtr == NULL) { return NULL; } + Tcl_DecrRefCount(transPtr); + length = readlink(Tcl_FSGetNativePath(pathPtr), link, sizeof(link)); if (length < 0) { return NULL; |