diff --git a/lib/private/files/storage/wrapper/encryption.php b/lib/private/files/storage/wrapper/encryption.php index e3458cb6bba2480614f52e74df1c101cea0a2b16..41a7f9e9242bbe92b45117f23e0e4e9f3cae9815 100644 --- a/lib/private/files/storage/wrapper/encryption.php +++ b/lib/private/files/storage/wrapper/encryption.php @@ -373,7 +373,10 @@ class Encryption extends Wrapper { * @return bool wrapped storage's isLocal() value */ public function isLocal() { - return false; + if ($this->encryptionManager->isEnabled()) { + return false; + } + return $this->storage->isLocal(); } /** diff --git a/tests/lib/files/storage/wrapper/encryption.php b/tests/lib/files/storage/wrapper/encryption.php index 93bf8c13e9b313d311e72d702358cdffb58c17cb..6fc9b17fad0756de7f23e5706fda44af94ae43e8 100644 --- a/tests/lib/files/storage/wrapper/encryption.php +++ b/tests/lib/files/storage/wrapper/encryption.php @@ -200,4 +200,7 @@ class Encryption extends \Test\Files\Storage\Storage { ); } + public function testIsLocal() { + $this->assertFalse($this->instance->isLocal()); + } }