Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
show suggestion to clean up possible invalid shares later
Signed-off-by: Arthur Schiwon <[email protected]>
  • Loading branch information
blizzz authored and backportbot[bot] committed Feb 2, 2021
commit 6ebb36826535a01cc94728470d54a019a6cf3d2b
6 changes: 6 additions & 0 deletions lib/private/Repair/RepairDavShares.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ class RepairDavShares implements IRepairStep {
private $groupManager;
/** @var LoggerInterface */
private $logger;
/** @var bool */
private $hintInvalidShares = false;

public function __construct(
IConfig $config,
Expand Down Expand Up @@ -88,6 +90,7 @@ protected function repairUnencodedGroupShares() {
|| !$this->groupManager->groupExists($gid)
|| ($gid !== $decodedGid && $this->groupManager->groupExists($decodedGid))
) {
$this->hintInvalidShares = $this->hintInvalidShares || $gid !== $encodedGid;
continue;
}

Expand Down Expand Up @@ -127,6 +130,9 @@ public function run(IOutput $output) {
&& $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.');
}
}
}
}