From owner-freebsd-cvsweb@FreeBSD.ORG Thu May 15 17:32:36 2003 Return-Path: Delivered-To: freebsd-cvsweb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3A98837B40E for ; Thu, 15 May 2003 17:32:36 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id CD4BF43F85 for ; Thu, 15 May 2003 17:32:34 -0700 (PDT) (envelope-from bgroh@redhat.com) Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id h4G0WYH07289 for ; Thu, 15 May 2003 20:32:34 -0400 Received: from hypatia.brisbane.redhat.com (IDENT:root@hypatia.brisbane.redhat.com [172.16.5.3]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h4G0WVI22107 for ; Thu, 15 May 2003 20:32:32 -0400 Received: from redhat.com (bernd.brisbane.redhat.com [172.16.5.91]) h4G0WSj03086 for ; Fri, 16 May 2003 10:32:29 +1000 Message-ID: <3EC43389.2020101@redhat.com> Date: Fri, 16 May 2003 10:40:41 +1000 From: Bernd Groh User-Agent: Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.2.1) Gecko/20030225 X-Accept-Language: de-at, de, en-us, en MIME-Version: 1.0 To: freebsd-cvsweb@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Tue, 20 May 2003 18:50:42 -0700 Subject: cvsweb.cgi: minor bug report [temporary patch] X-BeenThere: freebsd-cvsweb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS Web maintenance mailing list [restricted posting] List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2003 00:32:36 -0000 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