mirror of https://github.com/digint/btrbk
btrbk: bugfix: fixed crash in action "diff"
parent
eba0028fe4
commit
f9f85b5cb0
|
@ -5,6 +5,7 @@ btrbk-current
|
||||||
source subvolume).
|
source subvolume).
|
||||||
* Improved handling of command line subvolume filter for "run",
|
* Improved handling of command line subvolume filter for "run",
|
||||||
"dryrun" and "tree" actions (closes: #21).
|
"dryrun" and "tree" actions (closes: #21).
|
||||||
|
* Bugfix: fixed crash in action "diff".
|
||||||
|
|
||||||
btrbk-0.18.0
|
btrbk-0.18.0
|
||||||
|
|
||||||
|
|
6
btrbk
6
btrbk
|
@ -338,8 +338,10 @@ sub config_key($$)
|
||||||
my $key = shift || die;
|
my $key = shift || die;
|
||||||
TRACE "config_key: context=$node->{CONTEXT}, key=$key";
|
TRACE "config_key: context=$node->{CONTEXT}, key=$key";
|
||||||
while(not exists($node->{$key})) {
|
while(not exists($node->{$key})) {
|
||||||
# note: all config keys exist in root context (at least with default values)
|
# note: while all config keys exist in root context (at least with default values),
|
||||||
$node = $node->{PARENT} || die;
|
# we also allow fake configs (CONTEXT="cmdline") which have no PARENT.
|
||||||
|
return undef unless($node->{PARENT});
|
||||||
|
$node = $node->{PARENT};
|
||||||
}
|
}
|
||||||
TRACE "config_key: found value=" . ($node->{$key} // "<undef>");
|
TRACE "config_key: found value=" . ($node->{$key} // "<undef>");
|
||||||
return $node->{$key};
|
return $node->{$key};
|
||||||
|
|
Loading…
Reference in New Issue