aboutsummaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-11-05 11:34:28 -0800
committerJunio C Hamano <gitster@pobox.com>2008-11-05 11:34:28 -0800
commitd95f91d9e48a88a39ac2de5bfddd9d33fd36435d (patch)
tree4c0d7274cc003f30d665074a7404cd26d0d860c3 /gitweb
parentefcce2e1f0b37aed045d3e2b747380adf418bdd2 (diff)
parenteee0184da8457c1dbd4418f95d158917540da094 (diff)
downloadgit-d95f91d9e48a88a39ac2de5bfddd9d33fd36435d.tar.gz
git-d95f91d9e48a88a39ac2de5bfddd9d33fd36435d.tar.xz
Merge branch 'jc/gitweb-fix-cloud-tag'
* jc/gitweb-fix-cloud-tag: Fix reading of cloud tags
Diffstat (limited to 'gitweb')
-rwxr-xr-xgitweb/gitweb.perl6
1 files changed, 5 insertions, 1 deletions
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 = <CT>;
chomp $val;
@@ -1965,6 +1968,7 @@ sub git_get_project_ctags {
my $ctag = $_; $ctag =~ s#.*/##;
$ctags->{$ctag} = $val;
}
+ closedir D;
$ctags;
}