From b03562670973fd924a042064644994639a59667d Mon Sep 17 00:00:00 2001
From: Michael Gapczynski <mtgap@owncloud.com>
Date: Thu, 27 Dec 2012 16:53:32 -0500
Subject: [PATCH] Retrieve storage correctly, filename is not the mountpoint

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

diff --git a/lib/files.php b/lib/files.php
index 15bfbc3fc2..e1a31c6f03 100644
--- a/lib/files.php
+++ b/lib/files.php
@@ -117,7 +117,7 @@ class OC_Files {
 			}else{
 				header('Content-Type: '.\OC\Files\Filesystem::getMimeType($filename));
 				header("Content-Length: ".\OC\Files\Filesystem::filesize($filename));
-				$storage = \OC\Files\Filesystem::getStorage($filename);
+				list($storage) = \OC\Files\Filesystem::resolvePath($filename);
 				if ($storage instanceof \OC\File\Storage\Local) {
 					self::addSendfileHeader(\OC\Files\Filesystem::getLocalFile($filename));
 				}
-- 
GitLab