From: Christian Ebner <c.ebner@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH v4 proxmox-backup 4/5] client: drop unused parse_archive_type helper
Date: Wed, 13 Nov 2024 11:50:06 +0100 [thread overview]
Message-ID: <20241113105007.151258-5-c.ebner@proxmox.com> (raw)
In-Reply-To: <20241113105007.151258-1-c.ebner@proxmox.com>
Parsing of the type based on the archive name extension is now
handled by `BackupArchiveName`.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
---
changes since version 3:
- 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
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
next prev parent reply other threads:[~2024-11-13 10:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-13 10:50 [pbs-devel] [PATCH v4 proxmox-backup 0/5] introduce dedcated archive name api type Christian Ebner
2024-11-13 10:50 ` [pbs-devel] [PATCH v4 proxmox-backup 1/5] datastore: move `ArchiveType` to api types Christian Ebner
2024-11-13 10:50 ` [pbs-devel] [PATCH v4 proxmox-backup 2/5] api types: introduce `BackupArchiveName` type Christian Ebner
2024-11-13 10:50 ` [pbs-devel] [PATCH v4 proxmox-backup 3/5] client/server: use dedicated api type for all archive names Christian Ebner
2024-11-13 10:50 ` Christian Ebner [this message]
2024-11-13 10:50 ` [pbs-devel] [PATCH v4 proxmox-backup 5/5] api types: add unit tests for backup archive name parsing Christian Ebner
2024-11-22 10:33 ` [pbs-devel] [PATCH v4 proxmox-backup 0/5] introduce dedcated archive name api type Christian Ebner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241113105007.151258-5-c.ebner@proxmox.com \
--to=c.ebner@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox