mirror of
https://github.com/nextcloud/server.git
synced 2026-02-18 18:28:50 -05:00
Apps folder is defacto in root folder and not above
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
parent
4c81f5c4ad
commit
5b0e69828f
1 changed files with 2 additions and 9 deletions
11
lib/base.php
11
lib/base.php
|
|
@ -211,25 +211,18 @@ class OC {
|
|||
}
|
||||
} elseif (file_exists(OC::$SERVERROOT . '/apps')) {
|
||||
OC::$APPSROOTS[] = ['path' => OC::$SERVERROOT . '/apps', 'url' => '/apps', 'writable' => true];
|
||||
} elseif (file_exists(OC::$SERVERROOT . '/../apps')) {
|
||||
OC::$APPSROOTS[] = [
|
||||
'path' => rtrim(dirname(OC::$SERVERROOT), '/') . '/apps',
|
||||
'url' => '/apps',
|
||||
'writable' => true
|
||||
];
|
||||
}
|
||||
|
||||
if (empty(OC::$APPSROOTS)) {
|
||||
throw new \RuntimeException('apps directory not found! Please put the Nextcloud apps folder in the Nextcloud folder'
|
||||
. ' or the folder above. You can also configure the location in the config.php file.');
|
||||
. '. You can also configure the location in the config.php file.');
|
||||
}
|
||||
$paths = [];
|
||||
foreach (OC::$APPSROOTS as $path) {
|
||||
$paths[] = $path['path'];
|
||||
if (!is_dir($path['path'])) {
|
||||
throw new \RuntimeException(sprintf('App directory "%s" not found! Please put the Nextcloud apps folder in the'
|
||||
. ' Nextcloud folder or the folder above. You can also configure the location in the'
|
||||
. ' config.php file.', $path['path']));
|
||||
. ' Nextcloud folder. You can also configure the location in the config.php file.', $path['path']));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue