VFS should close source and target files during CopyToFile even if it errors
AnthonyRoss opened this issue · comments
Anthony Ross commented
CopyToFile currently doesn’t close the source and target files in s3 implementation if there is an error during copy. However, it should always close both the source and target files whether there is an error or not during the copy.
https://github.com/C2FO/vfs/blob/master/backend/s3/file.go#L110C16-L110C26
We should look into other implementations as well.
Ideally all implementations of CopyToFile should always close the source and target files if there is an error or not during copy