Merge pull request #14357 from owncloud/fix/1373
Run `updateDataDirectory` after Update
This commit is contained in:
commit
dbd2bb66e9
|
@ -12,6 +12,7 @@ use OC\Hooks\BasicEmitter;
|
||||||
use OC_App;
|
use OC_App;
|
||||||
use OC_Util;
|
use OC_Util;
|
||||||
use OCP\IConfig;
|
use OCP\IConfig;
|
||||||
|
use OC\Setup;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class that handles autoupdating of ownCloud
|
* Class that handles autoupdating of ownCloud
|
||||||
|
@ -202,14 +203,13 @@ class Updater extends BasicEmitter {
|
||||||
throw new \Exception('Updates between multiple major versions are unsupported.');
|
throw new \Exception('Updates between multiple major versions are unsupported.');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update htaccess files for apache hosts
|
// Update .htaccess files
|
||||||
if (isset($_SERVER['SERVER_SOFTWARE']) && strstr($_SERVER['SERVER_SOFTWARE'], 'Apache')) {
|
|
||||||
try {
|
try {
|
||||||
\OC\Setup::updateHtaccess();
|
Setup::updateHtaccess();
|
||||||
|
Setup::protectDataDirectory();
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
throw new \Exception($e->getMessage());
|
throw new \Exception($e->getMessage());
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// create empty file in data dir, so we can later find
|
// create empty file in data dir, so we can later find
|
||||||
// out that this is indeed an ownCloud data directory
|
// out that this is indeed an ownCloud data directory
|
||||||
|
|
Loading…
Reference in New Issue