[pbs-devel] [PATCH v9 proxmox-backup 13/58] file restore: cover extension for split pxar archives
Christian Ebner
c.ebner at proxmox.com
Wed Jun 5 12:53:31 CEST 2024
Cover the additional `.mpxar` for metadata archive and `.ppxar` for
the payload data for pxar archives written as split archive.
Signed-off-by: Christian Ebner <c.ebner at proxmox.com>
---
changes since version 8:
- prefix patch subject with `file restore` instead of `restore`
proxmox-file-restore/src/main.rs | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/proxmox-file-restore/src/main.rs b/proxmox-file-restore/src/main.rs
index 9be52e8b1..61dece97d 100644
--- a/proxmox-file-restore/src/main.rs
+++ b/proxmox-file-restore/src/main.rs
@@ -76,7 +76,7 @@ fn parse_path(path: String, base64: bool) -> Result<ExtractPath, Error> {
(file, path)
};
- if file.ends_with(".pxar.didx") {
+ if has_pxar_filename_extension(&file, true) {
Ok(ExtractPath::Pxar(file, path))
} else if file.ends_with(".img.fidx") {
Ok(ExtractPath::VM(file, path))
@@ -124,11 +124,13 @@ async fn list_files(
ExtractPath::ListArchives => {
let mut entries = vec![];
for file in manifest.files() {
- if !file.filename.ends_with(".pxar.didx") && !file.filename.ends_with(".img.fidx") {
+ if !has_pxar_filename_extension(&file.filename, true)
+ && !file.filename.ends_with(".img.fidx")
+ {
continue;
}
let path = format!("/{}", file.filename);
- let attr = if file.filename.ends_with(".pxar.didx") {
+ let attr = if has_pxar_filename_extension(&file.filename, true) {
// a pxar file is a file archive, so it's root is also a directory root
Some(&DirEntryAttribute::Directory { start: 0 })
} else {
--
2.39.2
More information about the pbs-devel
mailing list