From 5afa270577b9c2d4032e9bdc99a96619f5b546ba Mon Sep 17 00:00:00 2001 From: Axel Burri Date: Mon, 15 Jul 2019 18:36:06 +0200 Subject: [PATCH] btrbk: action origin: correctly handle root subvolumes having uuid --- btrbk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/btrbk b/btrbk index dd5dc2c..256fb6a 100755 --- a/btrbk +++ b/btrbk @@ -4723,7 +4723,8 @@ sub _origin_tree my $uuid = $node->{uuid} || die; # cache a bit, this might be large - $nodelist //= [ (sort { $a->{REL_PATH} cmp $b->{REL_PATH} } values %uuid_cache) ]; + # note: root subvolumes dont have REL_PATH + $nodelist //= [ (sort { ($a->{REL_PATH} // "") cmp ($b->{REL_PATH} // "") } values %uuid_cache) ]; my $out_path; $out_path = _fs_path($node);