When using Builder::append_path (or any of the append methods except append_link), if the file size changes during the archival, it will corrupt the archive. The GNU tar implementation seems to handle this by limiting the amount of bytes written to the archive in case the file got bigger, or padding it with zeroes if the file got smaller.
It is possible to work around this issue by calling append_data with a manually generated header and a wrapper around Read that limits the amount of bytes or returns padding zeroes, however it would be nice if this case is handled by tar::Builder.
When using
Builder::append_path
(or any of the append methods exceptappend_link
), if the file size changes during the archival, it will corrupt the archive. The GNU tar implementation seems to handle this by limiting the amount of bytes written to the archive in case the file got bigger, or padding it with zeroes if the file got smaller.It is possible to work around this issue by calling
append_data
with a manually generated header and a wrapper aroundRead
that limits the amount of bytes or returns padding zeroes, however it would be nice if this case is handled bytar::Builder
.