]> git.proxmox.com Git - proxmox-backup.git/commitdiff
pxar: improve error messages
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 9 Feb 2021 12:01:15 +0000 (13:01 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 9 Feb 2021 12:09:00 +0000 (13:09 +0100)
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
src/pxar/extract.rs
src/pxar/metadata.rs

index 9cf3f9284979e63037d976129e7a569dd0584549..0a61c88576e61be3214c9cd465d6faf484fb95cb 100644 (file)
@@ -403,7 +403,8 @@ impl Extractor {
             metadata,
             file.as_raw_fd(),
             &mut self.on_error,
-        )?;
+        )
+        .map_err(|err| format_err!("failed to apply initial flags: {}", err))?;
 
         let extracted = io::copy(&mut *contents, &mut file)
             .map_err(|err| format_err!("failed to copy file contents: {}", err))?;
@@ -445,7 +446,8 @@ impl Extractor {
             metadata,
             file.as_raw_fd(),
             &mut self.on_error,
-        )?;
+        )
+        .map_err(|err| format_err!("failed to apply initial flags: {}", err))?;
 
         let extracted = tokio::io::copy(&mut *contents, &mut file)
             .await
index 6e87db3d2b19fece2abd720d6e09e456f5888e02..4992cc8f1beefad7b9b6cd95e6832ce75f6fa151 100644 (file)
@@ -385,7 +385,7 @@ fn apply_flags(flags: Flags, fd: RawFd, entry_flags: u64) -> Result<(), Error> {
         match unsafe { fs::write_fat_attr_fd(fd, &fatattr) } {
             Ok(_) => (),
             Err(nix::Error::Sys(errno)) if errno_is_unsupported(errno) => (),
-            Err(err) => bail!("failed to set file attributes: {}", err),
+            Err(err) => bail!("failed to set file FAT attributes: {}", err),
         }
     }