aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Updater.php
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2016-11-02 09:40:10 +0100
committerJoas Schilling <coding@schilljs.com>2016-11-02 10:00:14 +0100
commit9b66e8f7d96cc5ca014d3f6b8031eb380d981adb (patch)
tree8fe9d494a7eeb73e06d8f0fa6875bcb6fed6d94c /lib/private/Updater.php
parent19af06cdea5719226d851bf4ad531220d2d37bed (diff)
downloadnextcloud-server-9b66e8f7d96cc5ca014d3f6b8031eb380d981adb.tar.gz
nextcloud-server-9b66e8f7d96cc5ca014d3f6b8031eb380d981adb.zip
Throw an exception when a shipped app was not replaced before the update
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/Updater.php')
-rw-r--r--lib/private/Updater.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/private/Updater.php b/lib/private/Updater.php
index 646fc031a83..91f24b903b8 100644
--- a/lib/private/Updater.php
+++ b/lib/private/Updater.php
@@ -381,6 +381,9 @@ class Updater extends BasicEmitter {
// check if the app is compatible with this version of ownCloud
$info = OC_App::getAppInfo($app);
if(!OC_App::isAppCompatible($version, $info)) {
+ if (OC_App::isShipped($app)) {
+ throw new \UnexpectedValueException('The files of the app "' . $app . '" were not correctly replaced before running the update');
+ }
OC_App::disable($app);
$this->emit('\OC\Updater', 'incompatibleAppDisabled', array($app));
}