Skip to content
Merged
Show file tree
Hide file tree
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
Improve output when repairing. Fix non-repair file:scan
  • Loading branch information
tomneedham committed Sep 17, 2017
commit 894981c6d5d80c7fd7473a0cbfd160591fba1221
7 changes: 3 additions & 4 deletions apps/files/lib/Command/Scan.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,7 @@ protected function scanFiles($user, $path, $verbose, OutputInterface $output, $b

protected function execute(InputInterface $input, OutputInterface $output) {
$inputPath = $input->getOption('path');
if ($input->getOption('repair')) {
$shouldRepairStoragesIndividually = true;
}
$shouldRepairStoragesIndividually = (bool) $input->getOption('repair');

if ($inputPath) {
$inputPath = '/' . trim($inputPath, '/');
Expand Down Expand Up @@ -304,7 +302,8 @@ protected function execute(InputInterface $input, OutputInterface $output) {
if ($this->userManager->userExists($user)) {
# add an extra line when verbose is set to optical separate users
if ($verbose) {$output->writeln(""); }
$output->writeln("Starting scan for user $user_count out of $users_total ($user)");
$r = $shouldRepairStoragesIndividually ? ' (and repair)' : '';
$output->writeln("Starting scan$r for user $user_count out of $users_total ($user)");
# full: printout data if $verbose was set
$this->scanFiles($user, $path, $verbose, $output, $input->getOption('unscanned'), $shouldRepairStoragesIndividually);
} else {
Expand Down
1 change: 1 addition & 0 deletions lib/private/Repair/RepairMismatchFileCachePath.php
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,7 @@ public function run(IOutput $out) {
$this->fixEntriesWithNonExistingParentIdEntry($out);
}
$out->finishProgress();
$out->info('');
}
}
}