]> git.proxmox.com Git - proxmox-backup.git/commitdiff
pxar: add file name to path_info when applying metadata
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Tue, 8 Oct 2024 08:33:54 +0000 (10:33 +0200)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Fri, 22 Nov 2024 09:38:42 +0000 (10:38 +0100)
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.

Acked-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
pbs-client/src/pxar/extract.rs
pbs-client/src/pxar/metadata.rs

index bea37ee105cbbfecc517e84e5220ad34b2abd0b0..60d8ce142e36dea0c06b6e53bdd2b5fdcdd8fa72 100644 (file)
@@ -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,
         )
     }
index 8e7a1431200adf0b12d28dd4a64507305e5e6fff..07154709495bd782bec69368d7ef6cb304630fb2 100644 (file)
@@ -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(