Skip to content
Snippets Groups Projects
Unverified Commit d4d33e30 authored by Roeland Jago Douma's avatar Roeland Jago Douma Committed by GitHub
Browse files

Merge pull request #25238 from nextcloud/enh/noid/apps-defacto-in-root

Apps folder is defacto in root folder and not above
parents 15b0e4d9 5b0e6982
No related branches found
No related tags found
No related merge requests found
...@@ -211,25 +211,18 @@ class OC { ...@@ -211,25 +211,18 @@ class OC {
} }
} elseif (file_exists(OC::$SERVERROOT . '/apps')) { } elseif (file_exists(OC::$SERVERROOT . '/apps')) {
OC::$APPSROOTS[] = ['path' => OC::$SERVERROOT . '/apps', 'url' => '/apps', 'writable' => true]; 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)) { if (empty(OC::$APPSROOTS)) {
throw new \RuntimeException('apps directory not found! Please put the Nextcloud apps folder in the Nextcloud folder' 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 = []; $paths = [];
foreach (OC::$APPSROOTS as $path) { foreach (OC::$APPSROOTS as $path) {
$paths[] = $path['path']; $paths[] = $path['path'];
if (!is_dir($path['path'])) { if (!is_dir($path['path'])) {
throw new \RuntimeException(sprintf('App directory "%s" not found! Please put the Nextcloud apps folder in the' 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' . ' Nextcloud folder. You can also configure the location in the config.php file.', $path['path']));
. ' config.php file.', $path['path']));
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment