diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-03-26 18:14:35 +0100 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-03-26 18:14:35 +0100 |
commit | b48510c978810a485f3ab72b28ec1c32350a6332 (patch) | |
tree | 6958959f4ce70ff6c06b4a68521655fc802fd188 /lib/private/files.php | |
parent | d57bb70b032b7a55fa8935300df611142f86c726 (diff) | |
download | nextcloud-server-b48510c978810a485f3ab72b28ec1c32350a6332.tar.gz nextcloud-server-b48510c978810a485f3ab72b28ec1c32350a6332.zip |
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.
Diffstat (limited to 'lib/private/files.php')
-rw-r--r-- | lib/private/files.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/files.php b/lib/private/files.php index 7e7a27f48dc..bfe6d3c02da 100644 --- a/lib/private/files.php +++ b/lib/private/files.php @@ -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 { |