From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup 1/2] pxar: add file name to path_info when applying metadata
Date: Tue, 8 Oct 2024 10:33:54 +0200 [thread overview]
Message-ID: <20241008083355.181031-1-f.gruenbichler@proxmox.com> (raw)
else, error messages using this path_info refer to the parent directory instead
of the actual file entry causing the problem. since this is just for
informational purposes, lossy conversion is acceptable.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
Notes:
noticed while preparing patch #2, can/should maybe be applied even if that one isn't ;)
| 10 ++++++++--
pbs-client/src/pxar/metadata.rs | 8 +++++++-
2 files changed, 15 insertions(+), 3 deletions(-)
--git a/pbs-client/src/pxar/extract.rs b/pbs-client/src/pxar/extract.rs
index b1245c5fc..c0a1db05d 100644
--- a/pbs-client/src/pxar/extract.rs
+++ b/pbs-client/src/pxar/extract.rs
@@ -724,7 +724,10 @@ impl Extractor {
self.feature_flags,
metadata,
file.as_raw_fd(),
- self.dir_stack.path(),
+ &self
+ .dir_stack
+ .path()
+ .join(file_name.to_string_lossy().to_string()),
&mut self.on_error,
)
}
@@ -783,7 +786,10 @@ impl Extractor {
self.feature_flags,
metadata,
file.as_raw_fd(),
- self.dir_stack.path(),
+ &self
+ .dir_stack
+ .path()
+ .join(file_name.to_string_lossy().to_string()),
&mut self.on_error,
)
}
diff --git a/pbs-client/src/pxar/metadata.rs b/pbs-client/src/pxar/metadata.rs
index 8e7a14312..071547094 100644
--- a/pbs-client/src/pxar/metadata.rs
+++ b/pbs-client/src/pxar/metadata.rs
@@ -72,7 +72,13 @@ pub fn apply_at(
Mode::empty(),
)?;
- apply(flags, metadata, fd.as_raw_fd(), path_info, on_error)
+ apply(
+ flags,
+ metadata,
+ fd.as_raw_fd(),
+ &path_info.join(file_name.to_string_lossy().to_string()),
+ on_error,
+ )
}
pub fn apply_initial_flags(
--
2.39.5
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
next reply other threads:[~2024-10-08 8:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-08 8:33 Fabian Grünbichler [this message]
2024-10-08 8:33 ` [pbs-devel] [RFC proxmox-backup 2/2] pxar: extract: make invalid ACLs non-fatal Fabian Grünbichler
2024-10-10 14:53 ` Gabriel Goller
2024-11-22 9:26 ` [pbs-devel] [PATCH proxmox-backup 1/2] pxar: add file name to path_info when applying metadata Thomas Lamprecht
2024-11-22 9:42 ` [pbs-devel] applied-series: " Fabian Grünbichler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241008083355.181031-1-f.gruenbichler@proxmox.com \
--to=f.gruenbichler@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.