[pve-devel] applied: [pve-zsync 2/2] Fix #1245: Fix snapshot parser.
Wolfgang Bumiller
w.bumiller at proxmox.com
Thu Jan 12 11:47:14 CET 2017
applied this one, waiting for v2 of patch 1
On Tue, Jan 10, 2017 at 10:56:52AM +0100, Wolfgang Link wrote:
> Make the snapshot parser more exact.
> This avoid that a wrong snap-name will returned
> if two or more job names has the same beginning.
> ---
> pve-zsync | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/pve-zsync b/pve-zsync
> index 8bd437e..6a651b8 100644
> --- a/pve-zsync
> +++ b/pve-zsync
> @@ -643,7 +643,7 @@ sub snapshot_get{
>
> while ($raw && $raw =~ s/^(.*?)(\n|$)//) {
> $line = $1;
> - if ($line =~ m/(rep_$name.*)$/) {
> + if ($line =~ m/(rep_\Q${name}\E_\d{4}-\d{2}-\d{2}_\d{2}:\d{2}:\d{2})$/) {
>
> $last_snap = $1 if (!$last_snap);
> $old_snap = $1;
> --
> 2.1.4
More information about the pve-devel
mailing list