Open solracsf opened 2 days ago
LOL I just wrote basically the same code and was about to shoot over the PR:
private function getTemplateFolder(): Node {
if ($this->getTemplatePath() !== '') {
$userTemplateFolder = $this->rootFolder->getUserFolder($this->userId)->get($this->getTemplatePath());
if ($userTemplateFolder->getType() === \OCP\Files\FileInfo::TYPE_FOLDER) {
return $userTemplateFolder;
}
}
throw new NotFoundException();
}
Both re-trigger the new template folder setup setting (good). I didn't make the exception message more verbose though. Since it's caught silently when used in getTemplateFiles()
I think re-triggering the Create new template folder option is enough (but won't hurt!).
Checklist