Skip to content

Commit e851166

Browse files
authored
Merge pull request #2109 from nextcloud/oc_26533
Transfer ownership only analyze home storage
2 parents cc500c2 + 7e68307 commit e851166

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

apps/files/lib/Command/TransferOwnership.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
use OC\Files\Filesystem;
2828
use OC\Files\View;
2929
use OCP\Files\FileInfo;
30+
use OCP\Files\IHomeStorage;
3031
use OCP\Files\Mount\IMountManager;
3132
use OCP\IUser;
3233
use OCP\IUserManager;
@@ -157,6 +158,10 @@ protected function analyse(OutputInterface $output) {
157158
$this->walkFiles($view, "$this->sourceUser/files",
158159
function (FileInfo $fileInfo) use ($progress, $self) {
159160
if ($fileInfo->getType() === FileInfo::TYPE_FOLDER) {
161+
// only analyze into folders from main storage,
162+
if (!$fileInfo->getStorage()->instanceOfStorage(IHomeStorage::class)) {
163+
return false;
164+
}
160165
return true;
161166
}
162167
$progress->advance();

0 commit comments

Comments
 (0)