summaryrefslogtreecommitdiffstats
path: root/lib/private/Repair
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-06-21 16:50:20 -0500
committerMorris Jobke <hey@morrisjobke.de>2017-06-22 15:43:59 -0500
commit846e62c225070cbe9f8a0c8b14ec2a1f87ba1ca1 (patch)
treee1907977225ae21bfb2ce1d9d7d0aa61dd40894e /lib/private/Repair
parentd3c20eefca1e8be222022f09384d629f7933c561 (diff)
downloadnextcloud-server-846e62c225070cbe9f8a0c8b14ec2a1f87ba1ca1.tar.gz
nextcloud-server-846e62c225070cbe9f8a0c8b14ec2a1f87ba1ca1.zip
Run repair step only once
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'lib/private/Repair')
-rw-r--r--lib/private/Repair/NC13/RepairInvalidPaths.php (renamed from lib/private/Repair/RepairInvalidPaths.php)10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/private/Repair/RepairInvalidPaths.php b/lib/private/Repair/NC13/RepairInvalidPaths.php
index cdd0906295f..8551f8261e2 100644
--- a/lib/private/Repair/RepairInvalidPaths.php
+++ b/lib/private/Repair/NC13/RepairInvalidPaths.php
@@ -19,7 +19,7 @@
*
*/
-namespace OC\Repair;
+namespace OC\Repair\NC13;
use OCP\IDBConnection;
@@ -114,8 +114,12 @@ class RepairInvalidPaths implements IRepairStep {
}
public function run(IOutput $output) {
- $count = $this->repair();
+ $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', '==')) {
+ $count = $this->repair();
- $output->info('Repaired ' . $count . ' paths');
+ $output->info('Repaired ' . $count . ' paths');
+ }
}
}