When files end early, read() will return with a zero return code. Before this patch, this would result in an infinite loop as no progress is ever made. Treat this gracefully and finish copying. (This came up reading generated files from a fuse-filesystem whose initial predicted stat() filesise didn't match the final size)
52 KiB
52 KiB