Skip to content

Commit

Permalink
RT2772 update: c_rehash was broken
Browse files Browse the repository at this point in the history
Move the readdir() lines out of the if statement, so
that flist is available globally.

Reviewed-by: Tim Hudson <[email protected]>
  • Loading branch information
Rich Salz committed Sep 11, 2014
1 parent cb4bb56 commit 6f46c3c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/c_rehash.in
Original file line number Diff line number Diff line change
Expand Up @@ -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 $_) {
Expand Down

0 comments on commit 6f46c3c

Please sign in to comment.