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/lib
diff options
context:
space:
mode:
authorThomas Müller <DeepDiver1975@users.noreply.github.com>2016-11-22 19:15:50 +0300
committerGitHub <noreply@github.com>2016-11-22 19:15:50 +0300
commitf118ac6e3783218d4d942c96a37ee06c9593bacf (patch)
tree3016ebdbb9dfba2b28d18e3c8b2ab83d69ff0ac3 /lib
parentd886da7a68321e699bb22a38ec9748b983ef290e (diff)
parent8d6a7b756ba5dd8dc7379589962d6fbd8231ee90 (diff)
Merge pull request #26600 from owncloud/stable9.1-d1c844093539a2d0bf89fd5068e85448c11a8be9
[stable9.1] Skip local shares in bkg scan and occ files:scan (#26590)
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Files/Utils/Scanner.php20
1 files changed, 15 insertions, 5 deletions
diff --git a/lib/private/Files/Utils/Scanner.php b/lib/private/Files/Utils/Scanner.php
index 0fbe0967877..21d567db5db 100644
--- a/lib/private/Files/Utils/Scanner.php
+++ b/lib/private/Files/Utils/Scanner.php
@@ -117,14 +117,19 @@ class Scanner extends PublicEmitter {
public function backgroundScan($dir) {
$mounts = $this->getMounts($dir);
foreach ($mounts as $mount) {
- if (is_null($mount->getStorage())) {
+ $storage = $mount->getStorage();
+ if (is_null($storage)) {
continue;
}
// don't scan the root storage
- if ($mount->getStorage()->instanceOfStorage('\OC\Files\Storage\Local') && $mount->getMountPoint() === '/') {
+ if ($storage->instanceOfStorage('\OC\Files\Storage\Local') && $mount->getMountPoint() === '/') {
+ continue;
+ }
+
+ // don't scan received local shares, these can be scanned when scanning the owner's storage
+ if ($storage->instanceOfStorage('OCA\Files_Sharing\ISharedStorage')) {
continue;
}
- $storage = $mount->getStorage();
$scanner = $storage->getScanner();
$this->attachListener($mount);
@@ -155,10 +160,10 @@ class Scanner extends PublicEmitter {
}
$mounts = $this->getMounts($dir);
foreach ($mounts as $mount) {
- if (is_null($mount->getStorage())) {
+ $storage = $mount->getStorage();
+ if (is_null($storage)) {
continue;
}
- $storage = $mount->getStorage();
// if the home storage isn't writable then the scanner is run as the wrong user
if ($storage->instanceOfStorage('\OC\Files\Storage\Home') and
(!$storage->isCreatable('') or !$storage->isCreatable('files'))
@@ -170,6 +175,11 @@ class Scanner extends PublicEmitter {
}
}
+
+ // don't scan received local shares, these can be scanned when scanning the owner's storage
+ if ($storage->instanceOfStorage('OCA\Files_Sharing\ISharedStorage')) {
+ continue;
+ }
$relativePath = $mount->getInternalPath($dir);
$scanner = $storage->getScanner();
$scanner->setUseTransactions(false);