From 6f46c3c3b007f1aed77bbb4d1657fab8521e2e08 Mon Sep 17 00:00:00 2001 From: Rich Salz Date: Thu, 11 Sep 2014 13:08:30 -0400 Subject: 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 --- tools/c_rehash.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tools') 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 $_) { -- cgit v1.2.3