diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-11-30 22:46:27 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-11-30 22:46:27 +0100 |
commit | 3808618ae9d100104e85f473649261f88b701134 (patch) | |
tree | 3be25945b01d1e02c4c54f79dca5ec9ce7b40ec0 | |
parent | 64ae79a9d9e1a76a221f15986956ae93d593d3d8 (diff) | |
parent | 5d7bd6f6ad4d77132857739a02087a9d93e64c6b (diff) | |
download | nextcloud-server-3808618ae9d100104e85f473649261f88b701134.tar.gz nextcloud-server-3808618ae9d100104e85f473649261f88b701134.zip |
Merge pull request #20844 from owncloud/files-scan-user-path-80
[8.0] Lock scanner to the given user
-rw-r--r-- | apps/files/command/scan.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/files/command/scan.php b/apps/files/command/scan.php index 87f799a0187..9a453f16fe5 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 { |