btrbk: fix fs_path

Fixes action "origin" and logging.

Regression:

  cc3f6c95b9 btrbk: return array in _fs_path
pull/358/head
Axel Burri 2020-12-12 20:09:57 +01:00
parent 8026fa3349
commit 53d5536929
1 changed files with 5 additions and 2 deletions

7
btrbk
View File

@ -2702,12 +2702,15 @@ sub _fs_info
my $node = shift // die;
my $url_prefix = shift // $node->{TREE_ROOT}{URL_PREFIX};
my @ret = __fs_info($node, $url_prefix);
return scalar(@ret) ? @ret : ({ path => "$url_prefix<$node->{TREE_ROOT}{mount_source}>/$node->{path}", mountinfo => undef });
@ret = ({ path => "$url_prefix<$node->{TREE_ROOT}{mount_source}>/$node->{path}",
mountinfo => undef }) unless(scalar(@ret));
return @ret;
}
sub _fs_path
{
return map $_->{path}, _fs_info(@_);
my @ret = map $_->{path}, _fs_info(@_);
return wantarray ? @ret : $ret[0];
}