From 7d88f5cec9080a53f1975298eaead7f69779384a Mon Sep 17 00:00:00 2001 From: 0xFelix Date: Sun, 14 Mar 2021 17:46:16 +0100 Subject: [PATCH] Fix bug when comparing snapshot and bookmark creation times This commit fixes a bug introduced in commit 522bdecd53d221d9c937986c5de76b80d287d8bc Creation times of snapshots have a three digit suffix while bookmark creation times do not. This leads to the comparison always being true. --- syncoid | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syncoid b/syncoid index f4a5a725..80ee2317 100755 --- a/syncoid +++ b/syncoid @@ -754,7 +754,7 @@ sub syncdataset { # do an replication to it and replicate as always from oldest to newest # because bookmark sends doesn't support intermediates directly foreach my $snap ( sort { $snaps{'source'}{$a}{'creation'}<=>$snaps{'source'}{$b}{'creation'} } keys %{ $snaps{'source'} }) { - if ($snaps{'source'}{$snap}{'creation'} >= $bookmarkcreation) { + if (substr($snaps{'source'}{$snap}{'creation'}, 0, -3) >= $bookmarks{$bookmarkguid}{'creation'}) { $nextsnapshot = $snap; last; }