]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
spawn: reinstate directory existence check
authorEric Wong <e@80x24.org>
Mon, 9 Oct 2023 18:16:18 +0000 (18:16 +0000)
committerEric Wong <e@80x24.org>
Mon, 9 Oct 2023 18:41:54 +0000 (18:41 +0000)
We must not attempt to use Inline::C unless a user requests
it (by creating the directory) or running lei.

Fixes: ebdccd6666f9 (spawn: drop checks for directory writability)
lib/PublicInbox/Spawn.pm

index ec256698de589082c37d9f66a6a24d498f3c975a..265638fe6c58f491077818510b1eb63909878c25 100644 (file)
@@ -287,6 +287,7 @@ ALL_LIBC
                        $ENV{XDG_CACHE_HOME} //
                        ( ($ENV{HOME} // '/nonexistent').'/.cache' )
                ).'/public-inbox/inline-c';
+       undef $all_libc unless -d $inline_dir;
        if (defined $all_libc) {
                local $ENV{PERL_INLINE_DIRECTORY} = $inline_dir;
                use autodie;