Commit b48510c9 authored by Vincent Petry's avatar Vincent Petry
Browse files

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.
parent d57bb70b
......@@ -148,8 +148,9 @@ class OC_Files {
} 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()) {
} else {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment