Date: Fri, 16 May 2003 10:40:41 +1000 From: Bernd Groh <bgroh@redhat.com> To: freebsd-cvsweb@freebsd.org Subject: cvsweb.cgi: minor bug report [temporary patch] Message-ID: <3EC43389.2020101@redhat.com>
next in thread | raw e-mail | index | archive | help
Hi there again, I know, I know, I didn't plan on doing it right now, but I ended up implementing a temporary fix. I'm sure there's a better way to do it, but I can't think of it right now, and I am too lazy to look it up. *l* Here's the patch: sub getDirLogs($$@) { my ($cvsroot, $dirname, @otherFiles) = @_; my ($state, $otherFiles, $tag, $file, $date, $branchpoint, $branch, $log); my ($rev, $revision, $revwanted, $filename, $head, $author); $tag = $input{only_with_tag}; my ($DirName) = $cvsroot . '/' . $where; my (@files, @filetags); # added new array to store files initially my (@allfiles); my $fh = do { local (*FH); }; push (@allfiles, &safeglob($DirName . '*,v')); push (@allfiles, &safeglob($DirName . 'Attic/*,v')) if (!$input{'hideattic'}); foreach my $file (@otherFiles) { push (@allfiles, $DirName . $file); } # just execute rlog with the files we have read access to # (i'm sure there's an easier way than actually having to # open the file, but I can't think of it at the moment *l*) foreach my $file (@allfiles) { my $readable = 1; open (READABLE, "<$file") or $readable = 0; if ($readable == 1) { close(READABLE); push (@files, $file); } } # just execute rlog if there are any files if ($#files < 0) { return; } # this will now also ensure that rlog is not called on any # files it really shouldn't be # after this point, code remains the same ... Cheers, Bernd -- Disclaimer: http://apac.redhat.com/disclaimer
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3EC43389.2020101>