summaryrefslogtreecommitdiffstats
path: root/apps/files/lib/Command
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2016-11-18 15:32:28 +0100
committerGitHub <noreply@github.com>2016-11-18 15:32:28 +0100
commite8511660f01faeebcc692b57cabdacd97845da92 (patch)
tree483af508fa3d0135d2cff839d1be5d659b8abfbb /apps/files/lib/Command
parentcc500c28103aff63f23ebe245d9b267aab91af10 (diff)
parent7e6830729e0d38ac22b4e337908d1a53f111f3c9 (diff)
downloadnextcloud-server-e8511660f01faeebcc692b57cabdacd97845da92.tar.gz
nextcloud-server-e8511660f01faeebcc692b57cabdacd97845da92.zip
Merge pull request #2109 from nextcloud/oc_26533
Transfer ownership only analyze home storage
Diffstat (limited to 'apps/files/lib/Command')
-rw-r--r--apps/files/lib/Command/TransferOwnership.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/files/lib/Command/TransferOwnership.php b/apps/files/lib/Command/TransferOwnership.php
index 022db999200..78487ce4d96 100644
--- a/apps/files/lib/Command/TransferOwnership.php
+++ b/apps/files/lib/Command/TransferOwnership.php
@@ -27,6 +27,7 @@ namespace OCA\Files\Command;
use OC\Files\Filesystem;
use OC\Files\View;
use OCP\Files\FileInfo;
+use OCP\Files\IHomeStorage;
use OCP\Files\Mount\IMountManager;
use OCP\IUser;
use OCP\IUserManager;
@@ -157,6 +158,10 @@ class TransferOwnership extends Command {
$this->walkFiles($view, "$this->sourceUser/files",
function (FileInfo $fileInfo) use ($progress, $self) {
if ($fileInfo->getType() === FileInfo::TYPE_FOLDER) {
+ // only analyze into folders from main storage,
+ if (!$fileInfo->getStorage()->instanceOfStorage(IHomeStorage::class)) {
+ return false;
+ }
return true;
}
$progress->advance();