-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
fix(TemplateManager): Make sure TemplateFolder is a Folder #49451
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
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 |
joshtrichards
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested/works.
a548991 to
56de083
Compare
I've added a separate log line instead, could help when user expects something but get nothing and can't understand why. |
3b59309 to
cd4c53b
Compare
|
/backport to stable30 |
|
/backport to stable29 |
Signed-off-by: Git'Fellow <[email protected]>
cd4c53b to
efa615b
Compare
templateDirectorypointed at a file] #49436Checklist