From f2075f803fc59918cc20071cf174d6b5f81f5eed Mon Sep 17 00:00:00 2001
From: dratini0 <dratini0@gmail.com>
Date: Tue, 30 Dec 2014 22:07:04 +0100
Subject: [PATCH] Fix: X-Accel-Redirect did not support custom data dir and
 local mounts

---
 lib/private/files.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/private/files.php b/lib/private/files.php
index 98f3c52d6c6..d42ab3d1852 100644
--- a/lib/private/files.php
+++ b/lib/private/files.php
@@ -182,7 +182,7 @@ class OC_Files {
 		}
 
 		if (isset($_SERVER['MOD_X_ACCEL_REDIRECT_ENABLED'])) {
-			$filename = \OC::$WEBROOT . '/data' . \OC\Files\Filesystem::getRoot() . $filename;
+			$filename = \OC\Files\Filesystem::getLocalFile($filename);
 			header("X-Accel-Redirect: " . $filename);
 		}
 	}
-- 
GitLab