Skip to content

Commit

Permalink
🩹 ensure fallback storage path exists (#187)
Browse files Browse the repository at this point in the history
  • Loading branch information
QWp6t authored Feb 5, 2022
1 parent 9155570 commit 401a73c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Roots/Acorn/Bootloader.php
Original file line number Diff line number Diff line change
@@ -304,11 +304,11 @@ protected function fallbackPath($path): string

protected function fallbackStoragePath()
{
if (! is_dir($path = WP_CONTENT_DIR . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'acorn')) {
$files = new Filesystem();
$files->makeDirectory($path, 0755, true);
$files->copyDirectory(dirname(__DIR__, 3) . DIRECTORY_SEPARATOR . 'storage', $path);
}
$files = new Filesystem();
$path = WP_CONTENT_DIR . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'acorn';
$files->ensureDirectoryExists($path . DIRECTORY_SEPARATOR . 'framework' . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'data', 0755, true);
$files->ensureDirectoryExists($path . DIRECTORY_SEPARATOR . 'framework' . DIRECTORY_SEPARATOR . 'views', 0755, true);
$files->ensureDirectoryExists($path . DIRECTORY_SEPARATOR . 'logs', 0755, true);

return $path;
}

0 comments on commit 401a73c

Please sign in to comment.