btrbk: bugfix: set REAL_PATH to vinfo_child only if it is confirmed

pull/30/head
Axel Burri 2015-04-20 18:50:12 +02:00
parent 6b00ea1741
commit 157f9333e7
1 changed files with 0 additions and 6 deletions

6
btrbk
View File

@ -265,9 +265,7 @@ sub vinfo_child($$)
my %info = ( my %info = (
NAME => $name, NAME => $name,
URL => "$parent->{URL}/$rel_path", URL => "$parent->{URL}/$rel_path",
REAL_URL => "$parent->{REAL_URL}/$rel_path",
PATH => "$parent->{PATH}/$rel_path", PATH => "$parent->{PATH}/$rel_path",
REAL_PATH => "$parent->{REAL_PATH}/$rel_path",
PRINT => "$parent->{PRINT}/$rel_path", PRINT => "$parent->{PRINT}/$rel_path",
); );
foreach (qw( HOST foreach (qw( HOST
@ -295,13 +293,9 @@ sub vinfo_set_detail($$)
# check and add detail data to vinfo hash # check and add detail data to vinfo hash
foreach(keys %$detail) { foreach(keys %$detail) {
if((defined $vol->{$_}) && ($vol->{$_} ne $detail->{$_})) { if((defined $vol->{$_}) && ($vol->{$_} ne $detail->{$_})) {
if($_ eq "REAL_PATH") {
DEBUG "Subvolume REAL_PATH changed (symlink): old=\"$vol->{REAL_PATH}\", new=\"$detail->{REAL_PATH}\"";
} else {
WARN "Subvolume detail key \"$_\" is already present, with a different value: old=\"$vol->{$_}\", new=\"$detail->{$_}\""; WARN "Subvolume detail key \"$_\" is already present, with a different value: old=\"$vol->{$_}\", new=\"$detail->{$_}\"";
WARN "Using new value for \"$_\": $detail->{$_}"; WARN "Using new value for \"$_\": $detail->{$_}";
} }
}
$vol->{$_} = $detail->{$_}; $vol->{$_} = $detail->{$_};
} }