mirror of
https://git.proxmox.com/git/proxmox-backup
synced 2025-04-28 11:30:58 +00:00
file restore: cover extension for split pxar archives
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@proxmox.com>
This commit is contained in:
parent
4dcc60e3d3
commit
8fb247b030
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user