fix(TaskProcessing): Set up fs in getFileContentsInternal

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
This commit is contained in:
Marcel Klehr 2024-11-26 11:07:20 +01:00 committed by backportbot[bot]
parent a27f11e7ac
commit 25f558d004

View file

@ -351,6 +351,9 @@ class TaskProcessingApiController extends \OCP\AppFramework\OCSController {
if (!in_array($fileId, $ids)) {
return new DataResponse(['message' => $this->l->t('Not found')], Http::STATUS_NOT_FOUND);
}
if ($task->getUserId() !== null) {
\OC_Util::setupFS($task->getUserId());
}
$node = $this->rootFolder->getFirstNodeById($fileId);
if ($node === null) {
$node = $this->rootFolder->getFirstNodeByIdInPath($fileId, '/' . $this->rootFolder->getAppDataDirectoryName() . '/');