From e8280c80da52399594ba116ef78bddf16b9e7f25 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Wed, 24 Sep 2014 15:48:54 +0200 Subject: [PATCH] Show a proper error message when trying to scan the filesystem for a non existing user --- apps/files/command/scan.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/files/command/scan.php b/apps/files/command/scan.php index e4d719a8b4..2dca0e0e67 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("Unknown user $user"); + } } } }