[Pkg-owncloud-commits] [owncloud] 142/258: Show a proper error message when trying to scan the filesystem for a non existing user

David Prévot taffit at moszumanska.debian.org
Sat Oct 11 17:22:30 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit 1ec756d12503ce0ef9d43e5abd7d9a12cca30383
Author: Robin Appelman <icewind at owncloud.com>
Date:   Wed Sep 24 15:48:54 2014 +0200

    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 3412cf8..10cbaab 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>");
+			}
 		}
 	}
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list