]> Lady’s Gitweb - Gitweb/blobdiff - gitweb.perl
Fix reading of cloud tags
[Gitweb] / gitweb.perl
index 102c6ee4dbe892b53d60bb338f50c727c25cc067cc6795530cbf7734c536f613..1172456fe85dff0203022d2ff770e00428e22c8d0d641bd9f23eaa1589fed83b 100755 (executable)
@@ -1847,7 +1847,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;
@@ -1855,6 +1858,7 @@ sub git_get_project_ctags {
                my $ctag = $_; $ctag =~ s#.*/##;
                $ctags->{$ctag} = $val;
        }
+       closedir D;
        $ctags;
 }
 
This page took 0.17491 seconds and 4 git commands to generate.