From a39d432dcea41e7330442d47f98b85d15dd3e770 Mon Sep 17 00:00:00 2001 From: Jakob Rath Date: Sat, 29 Jul 2017 07:24:53 +0200 Subject: [PATCH] Fix off-by-one error causing too many snapshots under certain conditions (closes #113) --- sanoid | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sanoid b/sanoid index 265dc9b..e31655b 100755 --- a/sanoid +++ b/sanoid @@ -318,7 +318,7 @@ sub take_snapshots { # reconstruct our human-formatted most recent preferred snapshot time into an epoch time, to compare with the epoch of our most recent snapshot my $maxage = time()-$lastpreferred; - if ( $newestage >= $maxage ) { + if ( $newestage > $maxage ) { # update to most current possible datestamp %datestamp = get_date(); # print "we should have had a $type snapshot of $path $maxage seconds ago; most recent is $newestage seconds old.\n";