btrbk: cosmetics: use $vinfo->{NAME} in get_receive_targets()

pull/30/head
Axel Burri 2015-05-15 16:11:15 +02:00
parent d28ed97065
commit bda8d2deb3
1 changed files with 1 additions and 5 deletions

6
btrbk
View File

@ -1048,12 +1048,8 @@ sub get_receive_targets($$)
{ {
# guess matches by subvolume name (node->received_uuid is not available if BTRFS_PROGS_COMPAT is set) # guess matches by subvolume name (node->received_uuid is not available if BTRFS_PROGS_COMPAT is set)
DEBUG "Fallback to compatibility mode (get_receive_targets)"; DEBUG "Fallback to compatibility mode (get_receive_targets)";
my $src_name = $src_vol->{SUBVOL_PATH};
$src_name =~ s/^.*\///; # strip path
foreach my $target (values %$droot_subvols) { foreach my $target (values %$droot_subvols) {
my $target_name = $target->{SUBVOL_PATH}; if($target->{NAME} eq $src_vol->{NAME}) {
$target_name =~ s/^.*\///; # strip path
if($target_name eq $src_name) {
TRACE "get_receive_targets: by-name: Found receive target: $target->{SUBVOL_PATH}"; TRACE "get_receive_targets: by-name: Found receive target: $target->{SUBVOL_PATH}";
push(@ret, $target); push(@ret, $target);
} }