mirror of
https://github.com/troglobit/libite.git
synced 2026-11-17 19:30:17 +00:00
libite: Improve error handling for copyfile() and rsync()
When using the simple rsync() or copyfile() functions of libite some error codes should not be interpreted as error. I.e., if a file or directory already exists when attempting to create it. Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
77971a31b2
commit
ddf5ecc907
2 files changed
+13
-3
No files matched your search
@@ -179,6 +179,7 @@ int copy_filep(FILE *src, FILE *dst)
|
||||
return errno;
|
||||
|
||||
while (1) {
|
||||
errno = 0;
|
||||
if (!fgets(buf, BUFSIZ, src)) {
|
||||
if (errno == EINTR) {
|
||||
clearerr(src);
|
||||
|
||||
Reference in new issue
Block a user