]> Sergey Matveev's repositories - public-inbox.git/commitdiff
wwwlisting: utf8::decode before undef
authorEric Wong <e@yhbt.net>
Sun, 31 May 2020 23:09:03 +0000 (23:09 +0000)
committerEric Wong <e@yhbt.net>
Wed, 3 Jun 2020 04:04:04 +0000 (04:04 +0000)
Assisted by commit a73957b5b05f2a00f7a85353b1658b6d8cde05ae
("testcommon: speed up wait_for_tail() on GNU/Linux")

Fixes: 846161e3d1207d59 ("treat $INBOX_DIR/description and gitweb.owner as UTF-8")
lib/PublicInbox/WwwListing.pm

index a416d24f0e446e27ae3c3148b061be9128ca7350..a3d4e2b3566972796bc6c920568a9a1078d485be 100644 (file)
@@ -157,10 +157,10 @@ sub manifest_add ($$;$$) {
 
        chomp(my $owner = $git->qx('config', 'gitweb.owner'));
        chomp(my $desc = try_cat("$git_dir/description"));
+       utf8::decode($owner);
+       utf8::decode($desc);
        $owner = undef if $owner eq '';
        $desc = 'Unnamed repository' if $desc eq '';
-       utf8::decode($desc);
-       utf8::decode($owner);
 
        # templates/hooks--update.sample and git-multimail in git.git
        # only match "Unnamed repository", not the full contents of