diff options
author | Vincent Petry <pvince81@owncloud.com> | 2016-11-02 19:53:23 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2016-11-14 14:34:30 +0100 |
commit | f31b794addd85f1d41a0ab112e824ece7f7ca009 (patch) | |
tree | f51a72cd261662cacbe5723ddf1396ca6293e2a2 /apps/files/lib/Command | |
parent | cebb68992509215163f6776b76e48411a31a287e (diff) | |
download | nextcloud-server-f31b794addd85f1d41a0ab112e824ece7f7ca009.tar.gz nextcloud-server-f31b794addd85f1d41a0ab112e824ece7f7ca009.zip |
Transfer ownership only analyze home storage
When transferring ownership, only the local files will be transferred
during the rename operation. This means that the analyzing code doesn't
need to recurse into any mount points.
Furthermore this fixes issues where FailedStorage might appear as mount
points as a result of inaccessible external storages or shares. So this
makes it more robust.
Diffstat (limited to 'apps/files/lib/Command')
-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 3b51e4a9e6d..13cbe62ff6f 100644 --- a/apps/files/lib/Command/TransferOwnership.php +++ b/apps/files/lib/Command/TransferOwnership.php @@ -157,6 +157,11 @@ 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, + // sub-storages have an empty internal path + if ($fileInfo->getInternalPath() === '' && $fileInfo->getPath() !== '') { + return false; + } return true; } $progress->advance(); |