From 2034b510588b72e0cc20881b655f9fa9c52965d2 Mon Sep 17 00:00:00 2001 From: Axel Burri Date: Sat, 9 May 2015 15:57:04 +0200 Subject: [PATCH] btrbk: bugfix: btrfs_subvolume_delete(): handle single targets correctly --- btrbk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/btrbk b/btrbk index 4570f96..7b35d36 100755 --- a/btrbk +++ b/btrbk @@ -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) {