diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2021-03-30 21:10:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-30 21:10:05 +0200 |
commit | 7c30d1aa2d27d81a067c1e8a52e6512f15f88d4d (patch) | |
tree | f636319c1bad22c700aa538a7bf106a69c905cc0 /apps/encryption | |
parent | 06ae9c3dc7dd14717ada7af7053405cf08c7dc9a (diff) | |
parent | 8a92229485095dbd8f379e2b489a3aa48cc37c79 (diff) | |
download | nextcloud-server-7c30d1aa2d27d81a067c1e8a52e6512f15f88d4d.tar.gz nextcloud-server-7c30d1aa2d27d81a067c1e8a52e6512f15f88d4d.zip |
Merge pull request #26219 from nextcloud/relative-path-null
getRelativePath can return null
Diffstat (limited to 'apps/encryption')
-rw-r--r-- | apps/encryption/lib/Crypto/Encryption.php | 2 | ||||
-rw-r--r-- | apps/encryption/lib/Util.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/apps/encryption/lib/Crypto/Encryption.php b/apps/encryption/lib/Crypto/Encryption.php index 6fa388e8875..51c5122eb93 100644 --- a/apps/encryption/lib/Crypto/Encryption.php +++ b/apps/encryption/lib/Crypto/Encryption.php @@ -435,7 +435,7 @@ class Encryption implements IEncryptionModule { public function shouldEncrypt($path) { if ($this->util->shouldEncryptHomeStorage() === false) { $storage = $this->util->getStorage($path); - if ($storage->instanceOfStorage('\OCP\Files\IHomeStorage')) { + if ($storage && $storage->instanceOfStorage('\OCP\Files\IHomeStorage')) { return false; } } diff --git a/apps/encryption/lib/Util.php b/apps/encryption/lib/Util.php index 2b11b8151c0..139dd3f50fa 100644 --- a/apps/encryption/lib/Util.php +++ b/apps/encryption/lib/Util.php @@ -191,7 +191,7 @@ class Util { * get storage of path * * @param string $path - * @return \OC\Files\Storage\Storage + * @return \OC\Files\Storage\Storage|null */ public function getStorage($path) { return $this->files->getMount($path)->getStorage(); |