diff --git a/ChangeLog b/ChangeLog index 804243c..2e8911a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ btrbk-current * Bugfix: fix sorting of dates in schedule(). + * Bugfix: correct parsing of btrfs subvolume list (closes: #28). btrbk-0.19.2 diff --git a/btrbk b/btrbk index c17421d..5e8a054 100755 --- a/btrbk +++ b/btrbk @@ -895,11 +895,15 @@ sub btr_tree($) foreach my $node (@$subvol_list) { - $id{$node->{id}} = $node; - $uuid_info{$node->{uuid}} = $node; - $node->{SUBTREE} //= {}; + $id{$node->{id}} = $node; + $uuid_info{$node->{uuid}} = $node; + } + + # note: it is possible that id < top_level, e.g. after restoring + foreach my $node (@$subvol_list) + { # set SUBTREE / TOP_LEVEL node die unless exists($id{$node->{top_level}}); my $top_level = $id{$node->{top_level}};