src/pxar/encoder.rs: fix bug with incorrect offset stored in goodbye table
Commit cd7dc87903a3c45e3d1521c3e7c1ea1500617a23 introduced the special treatment for .pxarexclude files when stored in the archive. The incorrect placement of a code snipplet from this path leads to an incorrect offset and size stored in the goodbye table. This fix places the start to the correct position, restoring the previously correct behaviour. Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
This commit is contained in:
parent
7dcbe051e9
commit
48a4509c67
@ -676,6 +676,8 @@ impl <'a, W: Write> Encoder<'a, W> {
|
||||
let mut goodbye_items = vec![];
|
||||
|
||||
for (filename, stat, exclude_list) in name_list {
|
||||
let start_pos = self.writer_pos;
|
||||
|
||||
if filename.as_bytes() == b".pxarexclude" {
|
||||
if let Some((ref content, ref stat)) = pxar_exclude {
|
||||
let filefd = match nix::fcntl::openat(rawfd, filename.as_ref(), OFlag::O_NOFOLLOW, Mode::empty()) {
|
||||
@ -706,8 +708,6 @@ impl <'a, W: Write> Encoder<'a, W> {
|
||||
|
||||
if self.verbose { println!("{:?}", self.full_path()); }
|
||||
|
||||
let start_pos = self.writer_pos;
|
||||
|
||||
if is_directory(&stat) {
|
||||
|
||||
let mut dir = match nix::dir::Dir::openat(rawfd, filename.as_ref(), OFlag::O_DIRECTORY|OFlag::O_NOFOLLOW, Mode::empty()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user