file-restore: Add 'v' (Virtual) ArchiveEntry type
For the actual partitions and blockdevices in a backup, which the user sees like folders in the file-restore ui Encoded as "None", to avoid cluttering DirEntryAttribute, where it wouldn't make any sense to have. Signed-off-by: Stefan Reiter <s.reiter@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
committed by
Thomas Lamprecht
parent
1011fb552b
commit
4d0dc29951
@ -174,8 +174,13 @@ async fn list(
|
||||
continue;
|
||||
}
|
||||
let path = format!("/{}", file.filename);
|
||||
let attr = DirEntryAttribute::Directory { start: 0 };
|
||||
entries.push(ArchiveEntry::new(path.as_bytes(), &attr));
|
||||
let attr = if file.filename.ends_with(".pxar.didx") {
|
||||
// a pxar file is a file archive, so it's root is also a directory root
|
||||
Some(&DirEntryAttribute::Directory { start: 0 })
|
||||
} else {
|
||||
None
|
||||
};
|
||||
entries.push(ArchiveEntry::new(path.as_bytes(), attr));
|
||||
}
|
||||
|
||||
Ok(entries)
|
||||
|
Reference in New Issue
Block a user