Move the readdir() lines out of the if statement, so
that flist is available globally.
Reviewed-by: Tim Hudson <tjh@openssl.org>
my %hashlist;
print "Doing $_[0]\n";
chdir $_[0];
+ opendir(DIR, ".");
+ my @flist = readdir(DIR);
+ closedir DIR;
if ( $removelinks ) {
- opendir(DIR, ".");
- my @flist = readdir(DIR);
- closedir DIR;
# Delete any existing symbolic links
foreach (grep {/^[\da-f]+\.r{0,1}\d+$/} @flist) {
if(-l $_) {