diff options
-rw-r--r-- | lib/App/BorgRestore/PathTimeTable/DB.pm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/App/BorgRestore/PathTimeTable/DB.pm b/lib/App/BorgRestore/PathTimeTable/DB.pm index 71c2804..3d080d1 100644 --- a/lib/App/BorgRestore/PathTimeTable/DB.pm +++ b/lib/App/BorgRestore/PathTimeTable/DB.pm @@ -68,6 +68,10 @@ method add_path($path, $time) { } $path = substr($path, 0, $slash_index); } + + # ensure that top level directory is also written + $self->_add_path_to_db($self->{archive_id}, $old_cache_path, $self->{cache}->{$old_cache_path}) unless $old_cache_path eq "."; + my $cached = $self->{cache}->{$path}; if (!defined $cached || $cached < $time) { $log->tracef("Setting cache time for path '%s' to %d", $path, $time) if TRACE; |