]> source.dussan.org Git - nextcloud-server.git/commitdiff
Use the correct resolve method to resolve file storage
authorVincent Petry <pvince81@owncloud.com>
Wed, 26 Mar 2014 17:14:35 +0000 (18:14 +0100)
committerVincent Petry <pvince81@owncloud.com>
Wed, 26 Mar 2014 17:14:35 +0000 (18:14 +0100)
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.

lib/private/files.php

index 7e7a27f48dc16d338181846cd450b3535e059f77..bfe6d3c02da2dae8be95bd9234c09f5625fef1b2 100644 (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 {