format: fix typo in function name
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
This commit is contained in:
parent
3bbb70b3d3
commit
708fab3082
|
@ -1817,7 +1817,7 @@ async fn complete_server_file_name_do(param: &HashMap<String, String>) -> Vec<St
|
|||
fn complete_archive_name(arg: &str, param: &HashMap<String, String>) -> Vec<String> {
|
||||
complete_server_file_name(arg, param)
|
||||
.iter()
|
||||
.map(|v| tools::format::strip_server_file_expenstion(&v))
|
||||
.map(|v| tools::format::strip_server_file_extension(&v))
|
||||
.collect()
|
||||
}
|
||||
|
||||
|
@ -1826,7 +1826,7 @@ pub fn complete_pxar_archive_name(arg: &str, param: &HashMap<String, String>) ->
|
|||
.iter()
|
||||
.filter_map(|name| {
|
||||
if name.ends_with(".pxar.didx") {
|
||||
Some(tools::format::strip_server_file_expenstion(name))
|
||||
Some(tools::format::strip_server_file_extension(name))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
|
@ -1839,7 +1839,7 @@ pub fn complete_img_archive_name(arg: &str, param: &HashMap<String, String>) ->
|
|||
.iter()
|
||||
.filter_map(|name| {
|
||||
if name.ends_with(".img.fidx") {
|
||||
Some(tools::format::strip_server_file_expenstion(name))
|
||||
Some(tools::format::strip_server_file_extension(name))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
|
|
|
@ -262,7 +262,7 @@ impl BackupWriter {
|
|||
let archive = if self.verbose {
|
||||
archive_name.to_string()
|
||||
} else {
|
||||
crate::tools::format::strip_server_file_expenstion(archive_name.clone())
|
||||
crate::tools::format::strip_server_file_extension(archive_name.clone())
|
||||
};
|
||||
if archive_name != CATALOG_NAME {
|
||||
let speed: HumanByte = ((uploaded * 1_000_000) / (duration.as_micros() as usize)).into();
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use anyhow::{Error};
|
||||
use serde_json::Value;
|
||||
|
||||
pub fn strip_server_file_expenstion(name: &str) -> String {
|
||||
pub fn strip_server_file_extension(name: &str) -> String {
|
||||
|
||||
if name.ends_with(".didx") || name.ends_with(".fidx") || name.ends_with(".blob") {
|
||||
name[..name.len()-5].to_owned()
|
||||
|
@ -12,7 +12,7 @@ pub fn strip_server_file_expenstion(name: &str) -> String {
|
|||
|
||||
pub fn render_backup_file_list(files: &[String]) -> String {
|
||||
let mut files: Vec<String> = files.iter()
|
||||
.map(|v| strip_server_file_expenstion(&v))
|
||||
.map(|v| strip_server_file_extension(&v))
|
||||
.collect();
|
||||
|
||||
files.sort();
|
||||
|
|
Loading…
Reference in New Issue