[pbs-devel] [PATCH v2 proxmox-backup 4/5] client: drop unused parse_archive_type helper
Christian Ebner
c.ebner at proxmox.com
Wed Jul 10 09:48:55 CEST 2024
Parsing of the type based on the archive name extension is now
handled by `BackupArchiveName`.
Signed-off-by: Christian Ebner <c.ebner at proxmox.com>
---
changes since version 1:
- no changes
proxmox-backup-client/src/main.rs | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/proxmox-backup-client/src/main.rs b/proxmox-backup-client/src/main.rs
index d079b3d60..0393eacc3 100644
--- a/proxmox-backup-client/src/main.rs
+++ b/proxmox-backup-client/src/main.rs
@@ -1382,18 +1382,6 @@ async fn dump_image<W: Write>(
Ok(())
}
-fn parse_archive_type(name: &str) -> (String, ArchiveType) {
- if name.ends_with(".didx") || name.ends_with(".fidx") || name.ends_with(".blob") {
- (name.into(), ArchiveType::from_path(name).unwrap())
- } else if has_pxar_filename_extension(name, false) {
- (format!("{}.didx", name), ArchiveType::DynamicIndex)
- } else if name.ends_with(".img") {
- (format!("{}.fidx", name), ArchiveType::FixedIndex)
- } else {
- (format!("{}.blob", name), ArchiveType::Blob)
- }
-}
-
#[api(
input: {
properties: {
--
2.39.2
More information about the pbs-devel
mailing list