From 74cdb521072057818511d3211fa698577009fae9 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Mon, 11 Mar 2019 10:23:16 +0100 Subject: [PATCH] src/bin/proxmox-backup-client.rs: include file extension in backupspec --- src/bin/proxmox-backup-client.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/bin/proxmox-backup-client.rs b/src/bin/proxmox-backup-client.rs index 17735370..36886cb2 100644 --- a/src/bin/proxmox-backup-client.rs +++ b/src/bin/proxmox-backup-client.rs @@ -25,7 +25,7 @@ use regex::Regex; use lazy_static::lazy_static; lazy_static! { - static ref BACKUPSPEC_REGEX: Regex = Regex::new(r"^([a-zA-Z0-9_-]+):(.+)$").unwrap(); + static ref BACKUPSPEC_REGEX: Regex = Regex::new(r"^([a-zA-Z0-9_-]+\.(:?catar|raw)):(.+)$").unwrap(); } fn backup_directory>( @@ -324,9 +324,7 @@ fn create_backup( if (stat.st_mode & libc::S_IFDIR) != 0 { - let target = format!("{}.catar", target); - - upload_list.push((filename.to_owned(), target)); + upload_list.push((filename.to_owned(), target.to_owned())); } else if (stat.st_mode & (libc::S_IFREG|libc::S_IFBLK)) != 0 { if stat.st_size <= 0 { bail!("got strange file size '{}'", stat.st_size); } @@ -488,7 +486,7 @@ fn main() { .required( "backupspec", ArraySchema::new( - "List of backup source specifications ([