[Pkg-owncloud-commits] [owncloud] 53/131: Lock scanner to the given user
David Prévot
taffit at moszumanska.debian.org
Tue Aug 11 15:58:31 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag v8.1.1
in repository owncloud.
commit 4c6b26d0563dcfd28c8969ad65e2d41f79578873
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 599dc60..99ce64e 100644
--- a/apps/files/command/scan.php
+++ b/apps/files/command/scan.php
@@ -92,10 +92,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('');
@@ -114,6 +114,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