diff options
Diffstat (limited to 'apps/files_encryption/lib/proxy.php')
-rw-r--r-- | apps/files_encryption/lib/proxy.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/files_encryption/lib/proxy.php b/apps/files_encryption/lib/proxy.php index ae2d8d63e23..03ddc795eae 100644 --- a/apps/files_encryption/lib/proxy.php +++ b/apps/files_encryption/lib/proxy.php @@ -53,10 +53,11 @@ class Proxy extends \OC_FileProxy { private static function shouldEncrypt($path, $mode = 'w') { $userId = Helper::getUser($path); + $session = new Session(new \OC\Files\View()); // don't call the crypt stream wrapper, if... if ( - \OCP\App::isEnabled('files_encryption') === false // encryption is disabled + $session->getInitialized() !== Session::INIT_SUCCESSFUL // encryption successful initialized || Crypt::mode() !== 'server' // we are not in server-side-encryption mode || strpos($path, '/' . $userId . '/files') !== 0 // path is not in files/ || substr($path, 0, 8) === 'crypt://' // we are already in crypt mode |