summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-03-19 14:26:10 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-03-19 14:26:10 (GMT)
commitd16b233ed8a81860e706a008bde82dfa568d4dcd (patch)
treecddea1a36d6b88042ae21a39031325c0bc28cb6e
parente22aa5854dc50ba15a3966093bec99d37059b93e (diff)
downloadtcl-d16b233ed8a81860e706a008bde82dfa568d4dcd.zip
tcl-d16b233ed8a81860e706a008bde82dfa568d4dcd.tar.gz
tcl-d16b233ed8a81860e706a008bde82dfa568d4dcd.tar.bz2
3597000 Consistent [file copy] result.
-rw-r--r--ChangeLog4
-rw-r--r--generic/tclFCmd.c15
2 files changed, 11 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 265faa8..8debc2c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2013-03-19 Don Porter <dgp@users.sourceforge.net>
+
+ * generic/tclFCmd.c: [Bug 3597000] Consistent [file copy] result.
+
2013-03-19 Jan Nijtmans <nijtmans@users.sf.net>
* win/tclWinFile.c: [Bug 2893771]: file stat fails on locked files
diff --git a/generic/tclFCmd.c b/generic/tclFCmd.c
index 5ad7063..382e9f3 100644
--- a/generic/tclFCmd.c
+++ b/generic/tclFCmd.c
@@ -691,15 +691,14 @@ CopyRenameOneFile(interp, source, target, copyFlag, force)
* so it should be quite clear
*/
errfile = target;
- /*
- * We now need to reset the result, because the above call,
- * if it failed, may have put an error message in place.
- * (Ideally we would prefer not to pass an interpreter in
- * above, but the channel IO code used by
- * TclCrossFilesystemCopy currently requires one)
- */
- Tcl_ResetResult(interp);
}
+ /*
+ * We now need to reset the result, because the above call,
+ * may have left set it. (Ideally we would prefer not to pass
+ * an interpreter in above, but the channel IO code used by
+ * TclCrossFilesystemCopy currently requires one)
+ */
+ Tcl_ResetResult(interp);
}
if ((copyFlag == 0) && (result == TCL_OK)) {
if (S_ISDIR(sourceStatBuf.st_mode)) {