Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
new error handling system
[rsync/rsync.git]
/
cleanup.c
diff --git
a/cleanup.c
b/cleanup.c
index
bd562ae
..
4b9cad3
100644
(file)
--- a/
cleanup.c
+++ b/
cleanup.c
@@
-40,6
+40,7
@@
extern int io_error;
void _exit_cleanup(int code, const char *file, int line)
{
extern int keep_partial;
void _exit_cleanup(int code, const char *file, int line)
{
extern int keep_partial;
+ extern int log_got_error;
if (code == 0 && io_error) code = RERR_FILEIO;
if (code == 0 && io_error) code = RERR_FILEIO;
@@
-69,6
+70,12
@@
void _exit_cleanup(int code, const char *file, int line)
if (code) log_exit(code, file, line);
if (code) log_exit(code, file, line);
+ if (code == 0) {
+ if (log_got_error) {
+ code = RERR_FILEIO;
+ }
+ }
+
exit(code);
}
exit(code);
}