btrbk: bugfix: btrfs_subvolume_delete(): handle single targets correctly

pull/30/head
Axel Burri 2015-05-09 15:57:04 +02:00
parent c4550e87d9
commit 2034b51058
1 changed files with 1 additions and 1 deletions

2
btrbk
View File

@ -774,7 +774,7 @@ sub btrfs_subvolume_delete($@)
my %opts = @_;
my $commit = $opts{commit};
die if($commit && ($commit ne "after") && ($commit ne "each"));
$targets = [ $targets ] unless(ref($targets));
$targets = [ $targets ] unless(ref($targets) eq "ARRAY");
return 0 unless(scalar(@$targets));
my $rsh = $targets->[0]->{RSH} || "";
foreach (@$targets) {