Skip to content

Commit

Permalink
Apps folder is defacto in root folder and not above
Browse files Browse the repository at this point in the history
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
  • Loading branch information
MorrisJobke committed Jan 20, 2021
1 parent 4c81f5c commit 5b0e698
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions lib/base.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,25 +211,18 @@ public static function initPaths() {
}
} 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']));
}
}

Expand Down

0 comments on commit 5b0e698

Please sign in to comment.