diff options
-rw-r--r-- | lib/private/DB/MigrationService.php | 6 | ||||
-rw-r--r-- | tests/lib/InstallerTest.php | 6 |
2 files changed, 11 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}\""); } } diff --git a/tests/lib/InstallerTest.php b/tests/lib/InstallerTest.php index a31c8826bd9..107b9dcb41f 100644 --- a/tests/lib/InstallerTest.php +++ b/tests/lib/InstallerTest.php @@ -19,6 +19,12 @@ use OCP\IConfig; use OCP\ILogger; use OCP\ITempManager; +/** + * Class InstallerTest + * + * @package Test + * @group DB + */ class InstallerTest extends TestCase { private static $appid = 'testapp'; |