[Pkg-owncloud-commits] [owncloud] 19/63: Lock scanner to the given user

David Prévot taffit at moszumanska.debian.org
Tue Dec 22 16:50:53 UTC 2015


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

taffit pushed a commit to branch stable8.0
in repository owncloud.

commit 5d7bd6f6ad4d77132857739a02087a9d93e64c6b
Author: Robin Appelman <icewind at owncloud.com>
Date:   Wed Jul 15 14:08:06 2015 +0200

    Lock scanner to the given user
---
 apps/files/command/scan.php | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/apps/files/command/scan.php b/apps/files/command/scan.php
index 87f799a..9a453f1 100644
--- a/apps/files/command/scan.php
+++ b/apps/files/command/scan.php
@@ -76,10 +76,10 @@ class Scan extends Command {
 	}
 
 	protected function execute(InputInterface $input, OutputInterface $output) {
-		$path = $input->getOption('path');
-		if ($path) {
-			$path = '/'.trim($path, '/');
-			list (, $user, ) = explode('/', $path, 3);
+		$inputPath = $input->getOption('path');
+		if ($inputPath) {
+			$inputPath = '/' . trim($inputPath, '/');
+			list (, $user,) = explode('/', $inputPath, 3);
 			$users = array($user);
 		} else if ($input->getOption('all')) {
 			$users = $this->userManager->search('');
@@ -98,6 +98,7 @@ class Scan extends Command {
 			if (is_object($user)) {
 				$user = $user->getUID();
 			}
+			$path = $inputPath ? $inputPath : '/' . $user;
 			if ($this->userManager->userExists($user)) {
 				$this->scanFiles($user, $path, $quiet, $output);
 			} else {

-- 
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