From 4c8bc61753dd26db1a239f8a6743c662d0d83dd4 Mon Sep 17 00:00:00 2001
From: Bart Visscher <bartv@thisnet.nl>
Date: Thu, 14 Nov 2013 08:46:15 +0100
Subject: [PATCH] XSendfile and encryption don't work together

The file on disk is encrypted, and not readable on client systems
---
 lib/private/files.php | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/private/files.php b/lib/private/files.php
index 8b8ff81ec5..6ffa14c0d9 100644
--- a/lib/private/files.php
+++ b/lib/private/files.php
@@ -109,6 +109,9 @@ class OC_Files {
 			$zip = false;
 			$filename = $dir . '/' . $files;
 			$name = $files;
+			if ($xsendfile && OC_App::isEnabled('files_encryption')) {
+				$xsendfile = false;
+			}
 		}
 		OC_Util::obEnd();
 		if ($zip or \OC\Files\Filesystem::isReadable($filename)) {
-- 
GitLab