]> git.proxmox.com Git - proxmox-backup.git/commitdiff
extract: don't interpret prelude as OsStr
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Mon, 10 Jun 2024 11:38:10 +0000 (13:38 +0200)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Mon, 10 Jun 2024 11:38:10 +0000 (13:38 +0200)
that would drop the final byte, and the corresponding code has been removed
from pxar now as well.

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

index 99c0d0e1035cc4218dea8f1d08655b19618e1965..38d4ca89a785eb9f48b5edcca349e4f32b913b78 100644 (file)
@@ -138,7 +138,7 @@ where
                     .open(path)
                     .with_context(|| format!("error creating prelude file '{path:?}'"))?;
                 if let pxar::EntryKind::Prelude(ref prelude) = entry.kind() {
-                    prelude_file.write_all(prelude.as_os_str().as_bytes())?;
+                    prelude_file.write_all(prelude.as_ref())?;
                 } else {
                     log::info!("unexpected entry kind for prelude");
                 }