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> {
|
fn complete_archive_name(arg: &str, param: &HashMap<String, String>) -> Vec<String> {
|
||||||
complete_server_file_name(arg, param)
|
complete_server_file_name(arg, param)
|
||||||
.iter()
|
.iter()
|
||||||
.map(|v| tools::format::strip_server_file_expenstion(&v))
|
.map(|v| tools::format::strip_server_file_extension(&v))
|
||||||
.collect()
|
.collect()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1826,7 +1826,7 @@ pub fn complete_pxar_archive_name(arg: &str, param: &HashMap<String, String>) ->
|
||||||
.iter()
|
.iter()
|
||||||
.filter_map(|name| {
|
.filter_map(|name| {
|
||||||
if name.ends_with(".pxar.didx") {
|
if name.ends_with(".pxar.didx") {
|
||||||
Some(tools::format::strip_server_file_expenstion(name))
|
Some(tools::format::strip_server_file_extension(name))
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
@ -1839,7 +1839,7 @@ pub fn complete_img_archive_name(arg: &str, param: &HashMap<String, String>) ->
|
||||||
.iter()
|
.iter()
|
||||||
.filter_map(|name| {
|
.filter_map(|name| {
|
||||||
if name.ends_with(".img.fidx") {
|
if name.ends_with(".img.fidx") {
|
||||||
Some(tools::format::strip_server_file_expenstion(name))
|
Some(tools::format::strip_server_file_extension(name))
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|
|
@ -262,7 +262,7 @@ impl BackupWriter {
|
||||||
let archive = if self.verbose {
|
let archive = if self.verbose {
|
||||||
archive_name.to_string()
|
archive_name.to_string()
|
||||||
} else {
|
} 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 {
|
if archive_name != CATALOG_NAME {
|
||||||
let speed: HumanByte = ((uploaded * 1_000_000) / (duration.as_micros() as usize)).into();
|
let speed: HumanByte = ((uploaded * 1_000_000) / (duration.as_micros() as usize)).into();
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
use anyhow::{Error};
|
use anyhow::{Error};
|
||||||
use serde_json::Value;
|
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") {
|
if name.ends_with(".didx") || name.ends_with(".fidx") || name.ends_with(".blob") {
|
||||||
name[..name.len()-5].to_owned()
|
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 {
|
pub fn render_backup_file_list(files: &[String]) -> String {
|
||||||
let mut files: Vec<String> = files.iter()
|
let mut files: Vec<String> = files.iter()
|
||||||
.map(|v| strip_server_file_expenstion(&v))
|
.map(|v| strip_server_file_extension(&v))
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
files.sort();
|
files.sort();
|
||||||
|
|
Loading…
Reference in New Issue