Files
libite/test
Joachim Wiberg 7f9f49626a Report read and write errors from copyfile()
copyfile() returns a byte count, with errno cleared, when the copy
fails after the first block.  movefile() across file systems then
removes the source and leaves a truncated copy.

The copy loop adds the result of write() to the total without checking
it, takes a failed read() for end of file, and the result of close() on
the destination is dropped.

Return -1 with errno set on any of them, and retry short writes.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-11-16 14:22:40 +01:00
..
2022-01-26 23:57:27 +08:00
2023-09-17 12:26:08 +02:00
2022-01-26 23:57:27 +08:00
2021-10-03 12:22:33 +02:00