X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=gitweb%2Fgitweb.perl;h=41b68668e841a3fb45a38ba0ec5a274e0d84214d;hb=eee0184da8457c1dbd4418f95d158917540da094;hp=11168006cffe9bd2f6c8c27bd1d034c41667e39a;hpb=67faaaba8338cf59c212ce5239eeb223a77acdf0;p=git.git diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 11168006c..41b68668e 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -1805,7 +1805,10 @@ sub git_get_project_ctags { my $ctags = {}; $git_dir = "$projectroot/$path"; - foreach (<$git_dir/ctags/*>) { + unless (opendir D, "$git_dir/ctags") { + return $ctags; + } + foreach (grep { -f $_ } map { "$git_dir/ctags/$_" } readdir(D)) { open CT, $_ or next; my $val = ; chomp $val; @@ -1813,6 +1816,7 @@ sub git_get_project_ctags { my $ctag = $_; $ctag =~ s#.*/##; $ctags->{$ctag} = $val; } + closedir D; $ctags; }