aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/command
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2014-09-24 15:48:54 +0200
committerRobin Appelman <icewind@owncloud.com>2014-09-24 15:48:54 +0200
commite8280c80da52399594ba116ef78bddf16b9e7f25 (patch)
treecb7932e74a31e65e60e880f7cf85dbc6a54d4e37 /apps/files/command
parent3da6b3b5334d5661506593d66d22e2cf358582fd (diff)
downloadnextcloud-server-e8280c80da52399594ba116ef78bddf16b9e7f25.tar.gz
nextcloud-server-e8280c80da52399594ba116ef78bddf16b9e7f25.zip
Show a proper error message when trying to scan the filesystem for a non existing user
Diffstat (limited to 'apps/files/command')
-rw-r--r--apps/files/command/scan.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/files/command/scan.php b/apps/files/command/scan.php
index e4d719a8b4b..2dca0e0e67c 100644
--- a/apps/files/command/scan.php
+++ b/apps/files/command/scan.php
@@ -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>");
+ }
}
}
}