Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2016-11-02 21:53:23 +0300
committerVincent Petry <pvince81@owncloud.com>2016-11-07 19:24:10 +0300
commitf3407ba973e20989470a20f179c779fff3e40eb1 (patch)
tree95e2ddef4bbb6ea61bf986df54756272a700c4a8 /apps
parent6accf54d906afb55eb69c0a04ec165d3c0cff037 (diff)
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')
-rw-r--r--apps/files/command/transferownership.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/files/command/transferownership.php b/apps/files/command/transferownership.php
index 1f46efdde0d..8cc0d2f9546 100644
--- a/apps/files/command/transferownership.php
+++ b/apps/files/command/transferownership.php
@@ -148,6 +148,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();