Merge pull request #7902 from owncloud/ext-xsendfileextstoragefix

Use the correct resolve method to resolve file storage (x-sendfile)
This commit is contained in:
Vincent Petry 2014-03-27 09:31:17 +01:00
commit c9ccacb9ea
1 changed files with 2 additions and 1 deletions

View File

@ -148,8 +148,9 @@ class OC_Files {
set_time_limit($executionTime); set_time_limit($executionTime);
} else { } else {
if ($xsendfile) { if ($xsendfile) {
$view = \OC\Files\Filesystem::getView();
/** @var $storage \OC\Files\Storage\Storage */ /** @var $storage \OC\Files\Storage\Storage */
list($storage) = \OC\Files\Filesystem::resolvePath($filename); list($storage) = $view->resolvePath($filename);
if ($storage->isLocal()) { if ($storage->isLocal()) {
self::addSendfileHeader(\OC\Files\Filesystem::getLocalFile($filename)); self::addSendfileHeader(\OC\Files\Filesystem::getLocalFile($filename));
} else { } else {