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
also repair storage id
Signed-off-by: Robin Appelman <[email protected]>
  • Loading branch information
icewind1991 committed Jan 27, 2021
commit 8bd39f081f52a5f2f4051db3743d49c200ef27c4
3 changes: 3 additions & 0 deletions apps/files/lib/Command/RepairTree.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ public function execute(InputInterface $input, OutputInterface $output): int {
$query->update('filecache')
->set('path', $query->createParameter('path'))
->set('path_hash', $query->func()->md5($query->createParameter('path')))
->set('storage', $query->createParameter('storage'))
->where($query->expr()->eq('fileid', $query->createParameter('fileid')));

foreach ($rows as $row) {
Expand All @@ -71,6 +72,7 @@ public function execute(InputInterface $input, OutputInterface $output): int {
$query->setParameters([
'fileid' => $row['fileid'],
'path' => $row['parent_path'] . '/' . $row['name'],
'storage' => $row['parent_storage'],
]);
$query->execute();
}
Expand All @@ -88,6 +90,7 @@ private function findBrokenTreeBits(): array {

$query->select('f.fileid', 'f.path', 'f.parent', 'f.name')
->selectAlias('p.path', 'parent_path')
->selectAlias('p.storage', 'parent_storage')
->from('filecache', 'f')
->innerJoin('f', 'filecache', 'p', $query->expr()->eq('f.parent', 'p.fileid'))
->where($query->expr()->orX(
Expand Down