From 2152b2b8e5c396e931af1d46795173eb54700018 Mon Sep 17 00:00:00 2001 From: Wolfgang Link Date: Tue, 10 Jan 2017 10:56:52 +0100 Subject: [PATCH] Fix #1245: Fix snapshot parser. 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 194eabf..074b99e 100644 --- a/pve-zsync +++ b/pve-zsync @@ -636,7 +636,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.39.2