[pbs-devel] [PATCH v7 proxmox-backup 25/69] tools: cover extension for split pxar archives

Christian Ebner c.ebner at proxmox.com
Mon May 27 16:32:39 CEST 2024


Cover the additional `.mpxar` for metadata archive and `.ppxar` for
the payload data file in the cli parameter completion callback.

Signed-off-by: Christian Ebner <c.ebner at proxmox.com>
---
changes since version 6:
- use newly introduced has_pxar_filename_extension helper

 pbs-client/src/tools/mod.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pbs-client/src/tools/mod.rs b/pbs-client/src/tools/mod.rs
index 6a9d1992d..f43058dbd 100644
--- a/pbs-client/src/tools/mod.rs
+++ b/pbs-client/src/tools/mod.rs
@@ -337,7 +337,7 @@ pub fn complete_pxar_archive_name(arg: &str, param: &HashMap<String, String>) ->
     complete_server_file_name(arg, param)
         .iter()
         .filter_map(|name| {
-            if name.ends_with(".pxar.didx") {
+            if has_pxar_filename_extension(name, true) {
                 Some(pbs_tools::format::strip_server_file_extension(name).to_owned())
             } else {
                 None
-- 
2.39.2





More information about the pbs-devel mailing list