Download a file in a subfolder in a sharedlink is not working

the $node created using the path (GET) parameter is not used when executing fileListDownloaded()
This commit is contained in:
Maxence Lange 2016-12-11 18:32:28 -01:00 committed by GitHub
parent 36717f564e
commit 9ef8d25e46

View file

@ -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());
@ -542,9 +542,9 @@ class ShareController extends Controller {
* @param Share\IShare $share
* @param array $files_list
*/
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);
}