diff options
author | Joas Schilling <coding@schilljs.com> | 2017-03-17 10:06:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-17 10:06:58 +0100 |
commit | e548d27d3a2e561152a66a4ee462e78d49cd6538 (patch) | |
tree | 0abe554b5325672186c3aea6de5d6ac4e09031a9 | |
parent | 5a8129f8ef43ac0b0cde58fd81a7b379dfbb26b4 (diff) | |
parent | cbebfaaf2bb14f9990738a085faa25c2eca8ce0b (diff) | |
download | nextcloud-server-e548d27d3a2e561152a66a4ee462e78d49cd6538.tar.gz nextcloud-server-e548d27d3a2e561152a66a4ee462e78d49cd6538.zip |
Merge pull request #3885 from nextcloud/downstream-26529
Skip FailedStorage in background scan
-rw-r--r-- | lib/private/Files/Utils/Scanner.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/private/Files/Utils/Scanner.php b/lib/private/Files/Utils/Scanner.php index 98e2c3c8ca2..e76f3225c3c 100644 --- a/lib/private/Files/Utils/Scanner.php +++ b/lib/private/Files/Utils/Scanner.php @@ -123,6 +123,12 @@ class Scanner extends PublicEmitter { if (is_null($storage)) { continue; } + + // don't bother scanning failed storages (shortcut for same result) + if ($storage->instanceOfStorage('OC\Files\Storage\FailedStorage')) { + continue; + } + // don't scan the root storage if ($storage->instanceOfStorage('\OC\Files\Storage\Local') && $mount->getMountPoint() === '/') { continue; @@ -166,6 +172,12 @@ class Scanner extends PublicEmitter { if (is_null($storage)) { continue; } + + // don't bother scanning failed storages (shortcut for same result) + if ($storage->instanceOfStorage('OC\Files\Storage\FailedStorage')) { + continue; + } + // 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')) |