Merge pull request #49491 from nextcloud/backport/49489/stable30

[stable30] fix(TaskProcessing): Set up fs in getFileContentsInternal
This commit is contained in:
Marcel Klehr 2024-11-26 13:35:22 +01:00 committed by GitHub
commit c0cdbd545d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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() . '/');