perlcritic: explicitly assign the result of readdir/file reads

This commit is contained in:
Graham Christensen
2021-09-07 21:53:07 -04:00
parent 85bb1c7ef9
commit 741590c923
4 changed files with 10 additions and 10 deletions

View File

@ -40,9 +40,9 @@ ok(-e "/tmp/s3/hydra/$successful_hash.narinfo", "The narinfo of a build that's a
my $gcRootsDir = getGCRootsDir;
opendir my $dir, $gcRootsDir or die;
while(readdir $dir) {
next if $_ eq "." or $_ eq "..";
unlink "$gcRootsDir/$_";
while(my $file = readdir $dir) {
next if $file eq "." or $file eq "..";
unlink "$gcRootsDir/$file";
}
closedir $dir;
system("hydra-s3-backup-collect-garbage");