mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-06 11:19:47 +00:00
fileops: set an error on write error for file copy
We set an error if we get an error when reading, but we don't bother setting an error message for write failing. This causes a cryptic error to be shown to the user when the target filesystem is full.
This commit is contained in:
parent
54738368ec
commit
edef91ee25
@ -703,6 +703,9 @@ static int cp_by_fd(int ifd, int ofd, bool close_fd_when_done)
|
||||
error = (int)len;
|
||||
}
|
||||
|
||||
if (error < 0)
|
||||
giterr_set(GITERR_OS, "write error while copying file");
|
||||
|
||||
if (close_fd_when_done) {
|
||||
p_close(ifd);
|
||||
p_close(ofd);
|
||||
|
Loading…
Reference in New Issue
Block a user