X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=gitweb%2Fgitweb.perl;h=9d1af7e55703c87168e949c285a97fbce867d3e5;hb=a1a846a19e854a3b3baff8f55c039846880a2635;hp=63c793ec398f0c378c3e3ec94b2d5675bdff418e;hpb=8db49a7f6f272ecb72c75a172e9753f3981488ce;p=git.git diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 63c793ec3..9d1af7e55 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -1957,7 +1957,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; @@ -1965,6 +1968,7 @@ sub git_get_project_ctags { my $ctag = $_; $ctag =~ s#.*/##; $ctags->{$ctag} = $val; } + closedir D; $ctags; }