From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, T_SCC_BODY_TEXT_LINE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id D6DB91F406 for ; Thu, 2 Nov 2023 20:59:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1698958775; bh=aqyL2WyuYhT7UIAoiAwXS+jYQmaPG9NbvxnS2ymXJx8=; h=Date:From:To:Subject:References:In-Reply-To:From; b=iDurtf/izlNJaFNZlxck+FPuppcrwzdyC/QA7f550QPloV7gyXbk6B7rwDRLhnVBU NJ3yX5whhozpCHTKoWAPbchdM6GEk2Tp/o5FdjCSvqXq2wxkFkMzrgd3LoKuI4TDJA Oz6hK8Jn88ATsJzovanMVLDFPk7FTznaXjWtKalk= Date: Thu, 2 Nov 2023 20:59:35 +0000 From: Eric Wong To: meta@public-inbox.org Subject: www: squash read_all usage fix Message-ID: <20231102205935.M641672@dcvr> References: <20231102093539.2067470-1-e@80x24.org> <20231102093539.2067470-14-e@80x24.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20231102093539.2067470-14-e@80x24.org> List-Id: Eric Wong wrote: > --- a/lib/PublicInbox/WWW.pm > +++ b/lib/PublicInbox/WWW.pm > @@ -588,7 +588,7 @@ sub stylesheets_prepare ($$) { > next; > }; > my $ctime = 0; > - my $local = PublicInbox::Git::read_all($fh, -s $fh); > + my $local = read_all $fh; # sets _ stat cache > if ($local =~ /\S/) { > $ctime = sprintf('%x',(stat(_))[10]); > $local = $mini->($local); Oops :x I should add tests there... diff --git a/lib/PublicInbox/WWW.pm b/lib/PublicInbox/WWW.pm index 502dd638..d2bd68ea 100644 --- a/lib/PublicInbox/WWW.pm +++ b/lib/PublicInbox/WWW.pm @@ -588,7 +588,7 @@ sub stylesheets_prepare ($$) { next; }; my $ctime = 0; - my $local = read_all $fh; # sets _ stat cache + my $local = PublicInbox::IO::read_all $fh; # sets _ if ($local =~ /\S/) { $ctime = sprintf('%x',(stat(_))[10]); $local = $mini->($local);