From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 487B060459 for ; Wed, 7 Oct 2020 13:53:46 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id E52B62E287 for ; Wed, 7 Oct 2020 13:53:15 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 4FBC82E269 for ; Wed, 7 Oct 2020 13:53:14 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 0C7D545C44 for ; Wed, 7 Oct 2020 13:53:14 +0200 (CEST) From: Stefan Reiter To: pbs-devel@lists.proxmox.com Date: Wed, 7 Oct 2020 13:53:02 +0200 Message-Id: <20201007115308.6275-2-s.reiter@proxmox.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007115308.6275-1-s.reiter@proxmox.com> References: <20201007115308.6275-1-s.reiter@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.042 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [proxmox-backup-client.rs, format.rs] Subject: [pbs-devel] [PATCH proxmox-backup 1/7] format: fix typo in function name X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2020 11:53:46 -0000 Signed-off-by: Stefan Reiter --- src/bin/proxmox-backup-client.rs | 6 +++--- src/client/backup_writer.rs | 2 +- src/tools/format.rs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/bin/proxmox-backup-client.rs b/src/bin/proxmox-backup-client.rs index 5a6ed4fe..97398f49 100644 --- a/src/bin/proxmox-backup-client.rs +++ b/src/bin/proxmox-backup-client.rs @@ -1817,7 +1817,7 @@ async fn complete_server_file_name_do(param: &HashMap) -> Vec) -> Vec { 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) -> .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) -> .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 } diff --git a/src/client/backup_writer.rs b/src/client/backup_writer.rs index b3fd3703..fc0eccfc 100644 --- a/src/client/backup_writer.rs +++ b/src/client/backup_writer.rs @@ -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(); diff --git a/src/tools/format.rs b/src/tools/format.rs index 98946689..c3aa791b 100644 --- a/src/tools/format.rs +++ b/src/tools/format.rs @@ -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 = files.iter() - .map(|v| strip_server_file_expenstion(&v)) + .map(|v| strip_server_file_extension(&v)) .collect(); files.sort(); -- 2.20.1