diff options
author | vincentdarley <vincentdarley> | 2003-01-28 14:52:40 (GMT) |
---|---|---|
committer | vincentdarley <vincentdarley> | 2003-01-28 14:52:40 (GMT) |
commit | 3d55b9414bbdc5a83e0b571616137f34312e668b (patch) | |
tree | df684e9d1c3c44044a8e1a18492f61795a8b0e9e /generic/tclIOUtil.c | |
parent | dca14b67b236f60b40e7bdcdff7e01a3f2288753 (diff) | |
download | tcl-3d55b9414bbdc5a83e0b571616137f34312e668b.zip tcl-3d55b9414bbdc5a83e0b571616137f34312e668b.tar.gz tcl-3d55b9414bbdc5a83e0b571616137f34312e668b.tar.bz2 |
filesystem bug fix and new test
Diffstat (limited to 'generic/tclIOUtil.c')
-rw-r--r-- | generic/tclIOUtil.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c index e74e94e..5e7c6b2 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.69 2003/01/10 15:03:53 vincentdarley Exp $ + * RCS: @(#) $Id: tclIOUtil.c,v 1.70 2003/01/28 14:52:47 vincentdarley Exp $ */ #include "tclInt.h" @@ -2610,6 +2610,13 @@ Tcl_FSLoadFile(interp, pathPtr, sym1, sym2, proc1Ptr, proc2Ptr, Tcl_DecrRefCount(perm); #endif + /* + * We need to reset the result now, because the cross- + * filesystem copy may have stored the number of bytes + * in the result + */ + Tcl_ResetResult(interp); + retVal = Tcl_FSLoadFile(interp, copyToPtr, sym1, sym2, proc1Ptr, proc2Ptr, &newLoadHandle, @@ -3491,7 +3498,7 @@ TclCrossFilesystemCopy(interp, source, target) if (Tcl_FSLstat(source, &sourceStatBuf) != 0) { tval.actime = sourceStatBuf.st_atime; tval.modtime = sourceStatBuf.st_mtime; - Tcl_FSUtime(source, &tval); + Tcl_FSUtime(target, &tval); } } } @@ -4843,6 +4850,7 @@ Tcl_FSGetFileSystemForPath(pathObjPtr) */ if (pathObjPtr->refCount == 0) { + panic("Tcl_FSGetFileSystemForPath called with object with refCount == 0"); return NULL; } |