From: Rich Salz Date: Thu, 11 Sep 2014 17:08:30 +0000 (-0400) Subject: RT2772 update: c_rehash was broken X-Git-Tag: OpenSSL_1_0_2-beta3~32 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=478b3470ff89ecb84133e1e7851979c7a22b3594;p=oweals%2Fopenssl.git 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 (cherry picked from commit 6f46c3c3b007f1aed77bbb4d1657fab8521e2e08) --- 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 $_) {