Show a proper error message when trying to scan the filesystem for a non existing user

This commit is contained in:
Robin Appelman 2014-09-24 15:48:54 +02:00
parent 3da6b3b533
commit e8280c80da

View file

@ -77,7 +77,11 @@ class Scan extends Command {
if (is_object($user)) {
$user = $user->getUID();
}
$this->scanFiles($user, $output);
if ($this->userManager->userExists($user)) {
$this->scanFiles($user, $output);
} else {
$output->writeln("<error>Unknown user $user</error>");
}
}
}
}