Merge pull request #300 from phreaker0/fix-perl-warning

fixed a regression which causes perl warnings
This commit is contained in:
Jim Salter 2018-12-04 17:37:23 -05:00 committed by GitHub
commit 25b4cf8285
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

6
sanoid
View File

@ -843,13 +843,15 @@ sub init {
}
# how 'bout some recursion? =)
my $recursive = $ini{$section}{'recursive'} && grep( /^$ini{$section}{'recursive'}$/, @istrue );
my $skipChildren = $ini{$section}{'skip_children'} && grep( /^$ini{$section}{'skip_children'}$/, @istrue );
my @datasets;
if (grep( /^$ini{$section}{'recursive'}$/, @istrue ) || grep( /^$ini{$section}{'skip_children'}$/, @istrue )) {
if ($recursive || $skipChildren) {
@datasets = getchilddatasets($config{$section}{'path'});
DATASETS: foreach my $dataset(@datasets) {
chomp $dataset;
if (grep( /^$ini{$section}{'skip_children'}$/, @istrue )) {
if ($skipChildren) {
if ($args{'debug'}) { print "DEBUG: ignoring $dataset.\n"; }
delete $config{$dataset};
next DATASETS;