Skip to content

Commit 14f7e56

Browse files
authored
Merge pull request #49489 from nextcloud/fix/taskprocessing-api-get-file-contents
fix(TaskProcessing): Set up fs in getFileContentsInternal
2 parents 57a2aa1 + 3ac14af commit 14f7e56

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

core/Controller/TaskProcessingApiController.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,9 @@ private function getFileContentsInternal(Task $task, int $fileId): Http\DataDown
349349
if (!in_array($fileId, $ids)) {
350350
return new DataResponse(['message' => $this->l->t('Not found')], Http::STATUS_NOT_FOUND);
351351
}
352+
if ($task->getUserId() !== null) {
353+
\OC_Util::setupFS($task->getUserId());
354+
}
352355
$node = $this->rootFolder->getFirstNodeById($fileId);
353356
if ($node === null) {
354357
$node = $this->rootFolder->getFirstNodeByIdInPath($fileId, '/' . $this->rootFolder->getAppDataDirectoryName() . '/');

0 commit comments

Comments
 (0)