mirror of https://github.com/digint/btrbk
btrbk: fix @stderr propagation from vinfo_init_root
As we print @stderr in warnings if vinfo_init_root() function fails, we need to make sure that @stderr contains sane values. Clearing @stderr is required when calling caching functions!pull/334/head
parent
67d24695f1
commit
631a4c30fe
2
btrbk
2
btrbk
|
@ -2626,10 +2626,12 @@ sub vinfo_init_root($)
|
||||||
my $vol = shift || die;
|
my $vol = shift || die;
|
||||||
|
|
||||||
# resolve btrfs tree from mount point
|
# resolve btrfs tree from mount point
|
||||||
|
@stderr = (); # clear @stderr (propagated for logging)
|
||||||
my ($mnt_path, $real_path, $subvolid, $mount_source, $mountpoints) = btrfs_mountpoint($vol);
|
my ($mnt_path, $real_path, $subvolid, $mount_source, $mountpoints) = btrfs_mountpoint($vol);
|
||||||
return undef unless($mnt_path && $real_path && $subvolid);
|
return undef unless($mnt_path && $real_path && $subvolid);
|
||||||
|
|
||||||
# read btrfs tree for the mount point
|
# read btrfs tree for the mount point
|
||||||
|
@stderr = (); # clear @stderr (propagated for logging)
|
||||||
my $mnt_vol = vinfo($vol->{URL_PREFIX} . $mnt_path, $vol->{CONFIG});
|
my $mnt_vol = vinfo($vol->{URL_PREFIX} . $mnt_path, $vol->{CONFIG});
|
||||||
my $mnt_tree_root = btr_tree($mnt_vol, $subvolid, $mount_source, $mountpoints);
|
my $mnt_tree_root = btr_tree($mnt_vol, $subvolid, $mount_source, $mountpoints);
|
||||||
return undef unless($mnt_tree_root);
|
return undef unless($mnt_tree_root);
|
||||||
|
|
Loading…
Reference in New Issue