diff --git a/lib/WebGUI/Storage.pm b/lib/WebGUI/Storage.pm index 6954ddd56..862af682a 100644 --- a/lib/WebGUI/Storage.pm +++ b/lib/WebGUI/Storage.pm @@ -384,8 +384,7 @@ sub delete { rmtree($path) if ($path); foreach my $subDir ($self->{_part1}.'/'.$self->{_part2}, $self->{_part1}) { my $uDir = $self->session->config->get('uploadsPath') . '/' . $subDir; - my $DH; - opendir $DH, $uDir; + opendir my ($DH), $uDir; if (defined $DH) { my @dirs = grep { !/^\.+$/ } readdir($DH); if (scalar @dirs == 0) {