[pbs-devel] [PATCH proxmox-backup 4/4] client: drop unused parse_archive_type helper

Christian Ebner c.ebner at proxmox.com
Thu Jul 4 10:55:59 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>
---
 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 57ef56991..2e2f194dd 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