mirror of https://github.com/digint/btrbk
btrbk: fix mountinfo tree root detection
Set node as tree root if mount_id == parent_id. For some reasons this
is never the case on my (mostly gentoo) systems.
Regression from: eb69bc88
btrbk: refactor mountinfo
pull/446/head
parent
ed8142ed9d
commit
0172e4a240
3
btrbk
3
btrbk
|
@ -2958,7 +2958,8 @@ sub mountinfo_tree($)
|
|||
my %id = map +( $_->{mount_id} => $_ ), @$mountinfo;
|
||||
my $tree_root;
|
||||
foreach my $node (@$mountinfo) {
|
||||
if(my $parent = $id{$node->{parent_id}}) {
|
||||
my $parent = $id{$node->{parent_id}};
|
||||
if($parent && ($node->{mount_id} != $node->{parent_id})) {
|
||||
$node->{PARENT} = $parent;
|
||||
push @{$parent->{SUBTREE}}, $node;
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue