aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2016-12-12 18:28:06 +0100
committerGitHub <noreply@github.com>2016-12-12 18:28:06 +0100
commite49088315ed8f1bd1fc8a5929ce081532f49bcdd (patch)
treef4bd11f0a542d592acab75cf6c63ecb2a5625aed
parente79cd27e5d3d6c84499760fe664c93136d7a5aea (diff)
parent43374292b15046cd530e7b4b13214fdb1ebab367 (diff)
downloadnextcloud-server-e49088315ed8f1bd1fc8a5929ce081532f49bcdd.tar.gz
nextcloud-server-e49088315ed8f1bd1fc8a5929ce081532f49bcdd.zip
Merge pull request #2615 from nextcloud/daita-sharecontroller
Download a file in a subfolder in a sharedlink is not working
-rw-r--r--apps/files_sharing/lib/Controller/ShareController.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareController.php b/apps/files_sharing/lib/Controller/ShareController.php
index 3b86f7dc23b..178c4265dd5 100644
--- a/apps/files_sharing/lib/Controller/ShareController.php
+++ b/apps/files_sharing/lib/Controller/ShareController.php
@@ -487,7 +487,7 @@ class ShareController extends Controller {
// Single file download
$this->singleFileDownloaded($share, $share->getNode());
} else if (!empty($files_list)) {
- $this->fileListDownloaded($share, $files_list);
+ $this->fileListDownloaded($share, $files_list, $node);
} else {
// The folder is downloaded
$this->singleFileDownloaded($share, $share->getNode());
@@ -541,10 +541,11 @@ class ShareController extends Controller {
*
* @param Share\IShare $share
* @param array $files_list
+ * @param \OCP\Files\Folder $node
*/
- protected function fileListDownloaded(Share\IShare $share, array $files_list) {
+ protected function fileListDownloaded(Share\IShare $share, array $files_list, \OCP\Files\Folder $node) {
foreach ($files_list as $file) {
- $subNode = $share->getNode()->get($file);
+ $subNode = $node->get($file);
$this->singleFileDownloaded($share, $subNode);
}