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

Christian Ebner c.ebner at proxmox.com
Fri Nov 22 11:30:10 CET 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 4:
- 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 a155f56f0..581bc245b 100644
--- a/proxmox-backup-client/src/main.rs
+++ b/proxmox-backup-client/src/main.rs
@@ -1380,18 +1380,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.5





More information about the pbs-devel mailing list