diff --git a/apps/files/command/transferownership.php b/apps/files/command/transferownership.php index 1f46efdde0d8..8cc0d2f95465 100644 --- a/apps/files/command/transferownership.php +++ b/apps/files/command/transferownership.php @@ -148,6 +148,11 @@ protected function analyse(OutputInterface $output) { $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, + // sub-storages have an empty internal path + if ($fileInfo->getInternalPath() === '' && $fileInfo->getPath() !== '') { + return false; + } return true; } $progress->advance();