Hi there,
Can you consider the attached patch?
This will apply the --ignore-failed-read flag to the case where a file
was changed as we read it, thus preventing tar from exiting with a
failure.
Right now this:
/bin/tar: ./log/apache2/xxx/access.log: file changed as we read it
/bin/tar: ./log/apache2/xxx/error.log: file changed as we read it
will result in an error state even if --ignore-failed-read is used,
which I believe is not intentional.
Thanks,
Stefanos
diff --git a/src/create.c b/src/create.c
index e543bbc..c8c38e9 100644
--- a/src/create.c
+++ b/src/create.c
@@ -1846,7 +1846,8 @@ dump_file0 (struct tar_stat_info *st, char const *name, char const *p)
WARNOPT (WARN_FILE_CHANGED,
(0, 0, _("%s: file changed as we read it"),
quotearg_colon (p)));
- set_exit_status (TAREXIT_DIFFERS);
+ if (! ignore_failed_read_option)
+ set_exit_status (TAREXIT_DIFFERS);
}
else if (atime_preserve_option == replace_atime_preserve
&& fd && (is_dir || original_size != 0)