From: Dominik Csapak <d.csapak@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [RFC PATCH] fix #3039: use the same ID regex for info and api
Date: Mon, 2 Nov 2020 13:08:04 +0100 [thread overview]
Message-ID: <20201102120804.11635-1-d.csapak@proxmox.com> (raw)
in the api we use PROXMOX_SAFE_ID_REGEX for backup ids, but here
(where we use it to list them) we use a local regex
since the first is a superset of the one used here, simply extend
the local one
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
i mean we *could* refactor that regex to a place where we could
use it from both places (tools? proxmox crate?), but is it worth it for
the 3 character changes?
src/backup/backup_info.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/backup/backup_info.rs b/src/backup/backup_info.rs
index 3ace44dc..c5d245e9 100644
--- a/src/backup/backup_info.rs
+++ b/src/backup/backup_info.rs
@@ -9,7 +9,7 @@ use lazy_static::lazy_static;
use super::manifest::MANIFEST_BLOB_NAME;
-macro_rules! BACKUP_ID_RE { () => (r"[A-Za-z0-9][A-Za-z0-9_-]+") }
+macro_rules! BACKUP_ID_RE { () => (r"[A-Za-z0-9_][A-Za-z0-9._\-]*") }
macro_rules! BACKUP_TYPE_RE { () => (r"(?:host|vm|ct)") }
macro_rules! BACKUP_TIME_RE { () => (r"[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z") }
--
2.20.1
next reply other threads:[~2020-11-02 12:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-02 12:08 Dominik Csapak [this message]
2020-11-03 5:38 ` [pbs-devel] applied: " Dietmar Maurer
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=20201102120804.11635-1-d.csapak@proxmox.com \
--to=d.csapak@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal