summaryrefslogtreecommitdiffstats
path: root/lib/private/app
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-10-26 09:52:47 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2015-10-26 09:53:04 +0100
commit2038b2ec34ff44165932ab9d94db54bc6f924577 (patch)
treea07096f00b2fcd2e6d62d74f6a4d065d2064f4f8 /lib/private/app
parent5a5bcccd0d612bbb23214777d33a6439b75ffb53 (diff)
downloadnextcloud-server-2038b2ec34ff44165932ab9d94db54bc6f924577.tar.gz
nextcloud-server-2038b2ec34ff44165932ab9d94db54bc6f924577.zip
Fail hard if shipped.json is missing
Diffstat (limited to 'lib/private/app')
-rw-r--r--lib/private/app/appmanager.php14
1 files changed, 5 insertions, 9 deletions
diff --git a/lib/private/app/appmanager.php b/lib/private/app/appmanager.php
index 5a932b7dc3f..1f993d8538f 100644
--- a/lib/private/app/appmanager.php
+++ b/lib/private/app/appmanager.php
@@ -297,16 +297,12 @@ class AppManager implements IAppManager {
private function loadShippedJson() {
if (is_null($this->shippedApps)) {
$shippedJson = \OC::$SERVERROOT . '/core/shipped.json';
- if (file_exists($shippedJson)) {
- $content = json_decode(file_get_contents($shippedJson), true);
- $this->shippedApps = $content['shippedApps'];
- $this->alwaysEnabled = $content['alwaysEnabled'];
- } else {
- $this->shippedApps = ['files', 'encryption', 'files_external',
- 'files_sharing', 'files_trashbin', 'files_versions', 'provisioning_api',
- 'user_ldap', 'user_webdavauth'];
- $this->alwaysEnabled = ['files', 'dav'];
+ if (!file_exists($shippedJson)) {
+ throw new \Exception("File not found: $shippedJson");
}
+ $content = json_decode(file_get_contents($shippedJson), true);
+ $this->shippedApps = $content['shippedApps'];
+ $this->alwaysEnabled = $content['alwaysEnabled'];
}
}