Auto create the data/viewcache folder if it doesn't exist (however)

This commit is contained in:
Bernd Bestel 2021-01-05 10:52:23 +01:00
parent 4a8d4120e1
commit ced709bbf9
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300

View File

@ -42,6 +42,12 @@ catch (EInvalidConfig $ex)
exit('Invalid setting in config.php: ' . $ex->getMessage());
}
// Create data/viewcache folder if it doesn't exist
if (!file_exists(GROCY_DATAPATH . '/viewcache'))
{
mkdir(GROCY_DATAPATH . '/viewcache');
}
// Setup base application
AppFactory::setContainer(new DI\Container());
$app = AppFactory::create();