summaryrefslogtreecommitdiffstats
path: root/lib/private/connector/sabre/file.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/connector/sabre/file.php')
-rw-r--r--lib/private/connector/sabre/file.php22
1 files changed, 6 insertions, 16 deletions
diff --git a/lib/private/connector/sabre/file.php b/lib/private/connector/sabre/file.php
index 58579f42dfc..a436973ba91 100644
--- a/lib/private/connector/sabre/file.php
+++ b/lib/private/connector/sabre/file.php
@@ -76,11 +76,6 @@ class File extends \OC\Connector\Sabre\Node implements \Sabre\DAV\IFile {
throw new \Sabre\DAV\Exception\ServiceUnavailable("File is not updatable: ".$e->getMessage());
}
- // throw an exception if encryption was disabled but the files are still encrypted
- if (\OC_Util::encryptedFiles()) {
- throw new \Sabre\DAV\Exception\ServiceUnavailable("Encryption is disabled");
- }
-
// verify path of the target
$this->verifyPath();
@@ -187,18 +182,13 @@ class File extends \OC\Connector\Sabre\Node implements \Sabre\DAV\IFile {
public function get() {
//throw exception if encryption is disabled but files are still encrypted
- if (\OC_Util::encryptedFiles()) {
- throw new \Sabre\DAV\Exception\ServiceUnavailable("Encryption is disabled");
- } else {
- try {
- return $this->fileView->fopen(ltrim($this->path, '/'), 'rb');
- } catch (\OCP\Encryption\Exception\EncryptionException $e) {
- throw new \Sabre\DAV\Exception\Forbidden($e->getMessage());
- } catch (\OCP\Files\StorageNotAvailableException $e) {
- throw new \Sabre\DAV\Exception\ServiceUnavailable("Failed to open file: ".$e->getMessage());
- }
+ try {
+ return $this->fileView->fopen(ltrim($this->path, '/'), 'rb');
+ } catch (\OCP\Encryption\Exception\EncryptionException $e) {
+ throw new \Sabre\DAV\Exception\Forbidden($e->getMessage());
+ } catch (\OCP\Files\StorageNotAvailableException $e) {
+ throw new \Sabre\DAV\Exception\ServiceUnavailable("Failed to open file: ".$e->getMessage());
}
-
}
/**