mirror of
https://git.proxmox.com/git/proxmox-backup
synced 2025-07-27 05:14:06 +00:00
client: drop unused parse_archive_type helper
Parsing of the type based on the archive name extension is now handled by `BackupArchiveName`. Signed-off-by: Christian Ebner <c.ebner@proxmox.com> FG: add removal of import Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
parent
6771869cc1
commit
7ad5ad82e5
@ -7,7 +7,6 @@ use std::task::Context;
|
||||
|
||||
use anyhow::{bail, format_err, Error};
|
||||
use futures::stream::{StreamExt, TryStreamExt};
|
||||
use pbs_client::tools::has_pxar_filename_extension;
|
||||
use serde::Deserialize;
|
||||
use serde_json::{json, Value};
|
||||
use tokio::sync::mpsc;
|
||||
@ -1376,18 +1375,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: {
|
||||
|
Loading…
Reference in New Issue
Block a user