From ebf60f42f7811a3a858831e012846da27f576f4b Mon Sep 17 00:00:00 2001 From: "Andreas J. Koenig" Date: Thu, 17 Feb 2011 14:33:33 +0100 Subject: [PATCH] bugfix: init did not work on empty directories --- lib/File/Rsync/Mirror/Recentfile.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/File/Rsync/Mirror/Recentfile.pm b/lib/File/Rsync/Mirror/Recentfile.pm index 7d69610..23e64d4 100644 --- a/lib/File/Rsync/Mirror/Recentfile.pm +++ b/lib/File/Rsync/Mirror/Recentfile.pm @@ -885,6 +885,7 @@ sub _merge_locked { my $myepoch = $my_recent->[0] ? $my_recent->[0]{epoch} : undef; my $epoch = $other_recent->[0] ? $other_recent->[0]{epoch} : $myepoch; my $oldest_allowed = 0; + $DB::single++; my $something_done; unless ($my_recent->[0]) { # obstetrics @@ -2038,6 +2039,10 @@ sub _locked_batch_update { my($self,$batch) = @_; my $something_done = 0; my $recent = $self->recent_events; + unless ($recent->[0]) { + # obstetrics + $something_done = 1; + } my %paths_in_recent = map { $_->{path} => undef } @$recent; my $interval = $self->interval; my $canonmeth = $self->canonize; -- 2.11.4.GIT