diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/lib/Command/TransferOwnership.php | 5 |
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(); |