summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2017-10-03 16:27:26 +0200
committerRobin Appelman <robin@icewind.nl>2017-10-03 16:27:26 +0200
commit7525c387ce2fd14cb007b434e93c415902d399db (patch)
treefd0e0e369ecaace93699c064a807c9eac0995f4a /lib/private
parent7bac8a32b4e2dc41bd81445330acce82e0456a99 (diff)
downloadnextcloud-server-7525c387ce2fd14cb007b434e93c415902d399db.tar.gz
nextcloud-server-7525c387ce2fd14cb007b434e93c415902d399db.zip
dont run invalid path repair step when upgrading from 11.0.5.2 and later
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/Repair/NC13/RepairInvalidPaths.php14
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/private/Repair/NC13/RepairInvalidPaths.php b/lib/private/Repair/NC13/RepairInvalidPaths.php
index 8e6a4ca0e37..a8ccb9a579f 100644
--- a/lib/private/Repair/NC13/RepairInvalidPaths.php
+++ b/lib/private/Repair/NC13/RepairInvalidPaths.php
@@ -172,10 +172,18 @@ class RepairInvalidPaths implements IRepairStep {
return $count;
}
- public function run(IOutput $output) {
+ private function shouldRun() {
$versionFromBeforeUpdate = $this->config->getSystemValue('version', '0.0.0');
- // was added to 12.0.0.30 and 13.0.0.1
- if (version_compare($versionFromBeforeUpdate, '12.0.0.30', '<') || version_compare($versionFromBeforeUpdate, '13.0.0.0', '==')) {
+
+ // was added to 11.0.5.2, 12.0.0.30 and 13.0.0.1
+ $shouldRun = version_compare($versionFromBeforeUpdate, '11.0.5.2', '<');
+ $shouldRun |= version_compare($versionFromBeforeUpdate, '12.0.0.0', '>=') && version_compare($versionFromBeforeUpdate, '12.0.0.30', '<');
+ $shouldRun |= version_compare($versionFromBeforeUpdate, '13.0.0.0', '==');
+ return $shouldRun;
+ }
+
+ public function run(IOutput $output) {
+ if ($this->shouldRun()) {
$count = $this->repair();
$output->info('Repaired ' . $count . ' paths');