summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2014-09-11 13:08:30 -0400
committerRich Salz <rsalz@openssl.org>2014-09-11 13:09:56 -0400
commit478b3470ff89ecb84133e1e7851979c7a22b3594 (patch)
tree56ba63e3ce99b47f31b50747ac459795c872bf00
parent3258429883c2c04efc20626c0694232ef2c2a17f (diff)
RT2772 update: c_rehash was broken
Move the readdir() lines out of the if statement, so that flist is available globally. Reviewed-by: Tim Hudson <tjh@openssl.org> (cherry picked from commit 6f46c3c3b007f1aed77bbb4d1657fab8521e2e08)
-rw-r--r--tools/c_rehash.in6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/c_rehash.in b/tools/c_rehash.in
index cd2cc39f27..887e927125 100644
--- a/tools/c_rehash.in
+++ b/tools/c_rehash.in
@@ -93,10 +93,10 @@ sub hash_dir {
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 $_) {