summaryrefslogtreecommitdiffstats
path: root/generic/tclIOUtil.c
diff options
context:
space:
mode:
authorvincentdarley <vincentdarley>2003-01-28 14:52:40 (GMT)
committervincentdarley <vincentdarley>2003-01-28 14:52:40 (GMT)
commit3d55b9414bbdc5a83e0b571616137f34312e668b (patch)
treedf684e9d1c3c44044a8e1a18492f61795a8b0e9e /generic/tclIOUtil.c
parentdca14b67b236f60b40e7bdcdff7e01a3f2288753 (diff)
downloadtcl-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.c12
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;
}