diff options
author | Florian Pritz <bluewind@xinu.at> | 2017-11-21 19:32:14 +0100 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2017-11-21 20:06:16 +0100 |
commit | 0ed455830d1d55e39b895388539200480c928776 (patch) | |
tree | 11d8d89001bcf449df15cefcbd9ac3b856577413 /lib/App | |
parent | 8bed4df94caf9bfa51857bb45b32fd287c6680e1 (diff) | |
download | App-BorgRestore-0ed455830d1d55e39b895388539200480c928776.tar.gz App-BorgRestore-0ed455830d1d55e39b895388539200480c928776.tar.xz |
borg_list_time: Fix parsing for borg >=1.1
Output now contains additional data after the date.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'lib/App')
-rw-r--r-- | lib/App/BorgRestore/Borg.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/App/BorgRestore/Borg.pm b/lib/App/BorgRestore/Borg.pm index 89a0b3a..31511de 100644 --- a/lib/App/BorgRestore/Borg.pm +++ b/lib/App/BorgRestore/Borg.pm @@ -53,7 +53,8 @@ method borg_list_time() { run [qw(borg list), $self->{borg_repo}], '>', \my $output or die $log->error("borg list returned $?")."\n"; for (split/^/, $output) { - if (m/^([^\s]+)\s+(.+)$/) { + # example timestamp: "Wed, 2016-01-27 10:31:59" = 24 chars + if (m/^([^\s]+)\s+(.{24})/) { my $time = App::BorgRestore::Helper::parse_borg_time($2); if ($time) { push @archives, { |