source: create missing cache subdirectories
authorMischa POSLAWSKY <perl@shiar.org>
Thu, 27 Jan 2022 22:45:50 +0000 (23:45 +0100)
committerMischa POSLAWSKY <perl@shiar.org>
Mon, 7 Feb 2022 17:42:33 +0000 (18:42 +0100)
Fix storage of modules such as Shiar_Sheet::Keyboard.

source.plp

index 358bf8475f7355eecc190b76399483aa69d92f18..b10f38b268708d286b573990ae2fc8888f906465 100644 (file)
@@ -86,6 +86,7 @@ else {
                say '</pre>';
                exit;
        }
+       -e or mkdir for $cachefile =~ s{[^/]+\z}{}r; # dirname
        open my $cache, '>', $cachefile
                or Alert("Could not save cache", "Opening $cachefile failed: $!");;