Overview
| Artifact ID: | 4995ad64730d980aca84e5271d3dfd6e2e8a03f9 |
|---|---|
| Ticket: | 3597000fffffffffffffffffffffffffffffffff
[file copy] return value inconsistency |
| User & Date: | ferrieux on 2012-12-18 04:00:44 |
Changes
- icomment:
The discrepancy comes from a different attitude various parts of the code towards interp-passing: - TclCopyChannel (aka fcopy), which is used for the cross-fs case, takes an interp and is documented to set the result to the number of bytes transferred - The per-fs ->copyFileProc, used otherwise for performance reasons (and its ability to copy links), happens to take no interp, and to return only TCL_OK or TCL_ERROR. As a consequence, directly returning the number of bytes from copyFileProc seems out of reach within 8.x (compat). One possibility though, would be to stat() the just-copied source or dest file, but that's ugly, slow, and subject to race conditions. Any better idea appreciated.
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"