]> source.dussan.org Git - nextcloud-server.git/commitdiff
Show a proper error message when trying to scan the filesystem for a non existing...
authorRobin Appelman <icewind@owncloud.com>
Wed, 24 Sep 2014 13:48:54 +0000 (15:48 +0200)
committerRobin Appelman <icewind@owncloud.com>
Wed, 24 Sep 2014 13:48:54 +0000 (15:48 +0200)
apps/files/command/scan.php

index e4d719a8b4be93623cd3081a43566b9a0e53f782..2dca0e0e67c7ad673011c9bd4dcfc0c4300e4c0c 100644 (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>");
+                       }
                }
        }
 }