From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 3FE1B1F461; Wed, 26 Jun 2019 06:35:04 +0000 (UTC) Date: Wed, 26 Jun 2019 06:35:04 +0000 From: Eric Wong To: Ali Alnubani Cc: meta@public-inbox.org Subject: Re: [PATCH] searchview: avoid displaying full paths on errors Message-ID: <20190626063504.opzyiqyuhtgcfuwo@dcvr> References: <20190611193815.c4uovtlp574bid6x@dcvr> <20190612171828.b6xvwol57hw3e4ri@dcvr> <20190625063705.tugph4uyh3vetlkj@dcvr> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: List-Id: Ali Alnubani wrote: > Thanks for the patch Eric. > I apologize for taking so long to update mine. No worries. Pushed as c19a4e88f49ba3496751c4b87ebcfa0f6b47f0ce > > sub err_txt { > > my ($ctx, $err) = @_; > > my $u = $ctx->{-inbox}->base_url($ctx->{env}) . '_/text/help/'; > > $err =~ s/^\s*Exception:\s*//; # bad word to show users :P > > + $err =~ s!(\S+)!path2inc($1)!sge; One potential issue is this won't match paths if somebody has spaces in their installation paths. But I suppose few distros or users building their own Perl are that strange...