diff options
Diffstat (limited to 'lib/private/DB/MigrationService.php')
-rw-r--r-- | lib/private/DB/MigrationService.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/private/DB/MigrationService.php b/lib/private/DB/MigrationService.php index 44412a967fb..70f81d9c808 100644 --- a/lib/private/DB/MigrationService.php +++ b/lib/private/DB/MigrationService.php @@ -78,9 +78,13 @@ class MigrationService { $namespace = App::buildAppNamespace($appName); $this->migrationsPath = "$appPath/lib/Migration"; $this->migrationsNamespace = $namespace . '\\Migration'; + + if (!@mkdir($appPath . '/lib') && !is_dir($appPath . '/lib')) { + throw new \RuntimeException("Could not create migration folder \"{$this->migrationsPath}\""); + } } - if (!is_dir($this->migrationsPath) && !mkdir($this->migrationsPath)) { + if (!@mkdir($this->migrationsPath) && !is_dir($this->migrationsPath)) { throw new \RuntimeException("Could not create migration folder \"{$this->migrationsPath}\""); } } |