[pbs-devel] [RFC proxmox-backup 17/36] restore: cover meta extension for pxar archives

Christian Ebner c.ebner at proxmox.com
Wed Feb 28 15:02:07 CET 2024


Signed-off-by: Christian Ebner <c.ebner at proxmox.com>
---
 proxmox-file-restore/src/main.rs | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/proxmox-file-restore/src/main.rs b/proxmox-file-restore/src/main.rs
index 50875a63..9ca6029a 100644
--- a/proxmox-file-restore/src/main.rs
+++ b/proxmox-file-restore/src/main.rs
@@ -75,7 +75,7 @@ fn parse_path(path: String, base64: bool) -> Result<ExtractPath, Error> {
         (file, path)
     };
 
-    if file.ends_with(".pxar.didx") {
+    if file.ends_with(".pxar.didx") || file.ends_with(".pxar.meta.didx") {
         Ok(ExtractPath::Pxar(file, path))
     } else if file.ends_with(".img.fidx") {
         Ok(ExtractPath::VM(file, path))
@@ -123,11 +123,16 @@ 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 !file.filename.ends_with(".pxar.didx")
+                    && !file.filename.ends_with(".img.fidx")
+                    && !file.filename.ends_with(".pxar.meta.didx")
+                {
                     continue;
                 }
                 let path = format!("/{}", file.filename);
-                let attr = if file.filename.ends_with(".pxar.didx") {
+                let attr = if file.filename.ends_with(".pxar.didx")
+                    || file.filename.ends_with(".pxar.meta.didx")
+                {
                     // 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