From 04496a71ca1bad53e84fb69f7ea4fc90e9bbcfd6 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Fri, 29 Jan 2021 17:43:58 +0100 Subject: [PATCH] show suggestion to clean up possible invalid shares later Signed-off-by: Arthur Schiwon --- lib/private/Repair/RepairDavShares.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/private/Repair/RepairDavShares.php b/lib/private/Repair/RepairDavShares.php index ff4c51484eb..64104c1e28a 100644 --- a/lib/private/Repair/RepairDavShares.php +++ b/lib/private/Repair/RepairDavShares.php @@ -48,6 +48,8 @@ class RepairDavShares implements IRepairStep { private $groupManager; /** @var LoggerInterface */ private $logger; + /** @var bool */ + private $hintInvalidShares = false; public function __construct( IConfig $config, @@ -88,6 +90,7 @@ class RepairDavShares implements IRepairStep { || !$this->groupManager->groupExists($gid) || ($gid !== $decodedGid && $this->groupManager->groupExists($decodedGid)) ) { + $this->hintInvalidShares = $this->hintInvalidShares || $gid !== $encodedGid; continue; } @@ -127,6 +130,9 @@ class RepairDavShares implements IRepairStep { && $this->repairUnencodedGroupShares() ) { $output->info('Repaired DAV group shares'); + if ($this->hintInvalidShares) { + $output->info('Invalid shares might be left in the database, running "occ dav:remove-invalid-shares" can remove them.'); + } } } } -- 2.39.5