From 936d5640582ad5540d8287a133af06b3c9621bed Mon Sep 17 00:00:00 2001 From: Thomas Müller Date: Mon, 27 Apr 2015 14:26:05 +0200 Subject: fixes #15848 --- lib/private/files/storage/wrapper/encryption.php | 5 ++++- tests/lib/files/storage/wrapper/encryption.php | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/private/files/storage/wrapper/encryption.php b/lib/private/files/storage/wrapper/encryption.php index af48d3475c3..279e4a86f7c 100644 --- a/lib/private/files/storage/wrapper/encryption.php +++ b/lib/private/files/storage/wrapper/encryption.php @@ -363,7 +363,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 93bf8c13e9b..6fc9b17fad0 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()); + } } -- cgit v1.2.3