Use the correct resolve method to resolve file storage

When detecting whether the file to be downloaded is on external storage,
the correct path needs to be used.

It turns out that \OC\Files\View is needed to resolve the path correctly
relative to the user's home.
This commit is contained in:
Vincent Petry 2014-03-26 18:14:35 +01:00
parent d57bb70b03
commit b48510c978
1 changed files with 2 additions and 1 deletions

View File

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