Skip to content
Snippets Groups Projects
Unverified Commit cbebfaaf authored by Vincent Petry's avatar Vincent Petry Committed by Morris Jobke
Browse files

Skip FailedStorage in background scan


The background job that scans storages must skip failed storages to
avoid potential exceptions, especially when the failed storage comes
from a shared storage where the source is not accessible.

Signed-off-by: default avatarMorris Jobke <hey@morrisjobke.de>
parent 39afcbd4
No related branches found
No related tags found
No related merge requests found
......@@ -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'))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment