Skip to content

Commit

Permalink
fix(TemplateManager): Bail early if templatedirectory is empty
Browse files Browse the repository at this point in the history
fixes #39266

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
  • Loading branch information
marcelklehr committed Dec 4, 2023
1 parent df7bc46 commit 33e0a10
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/private/Files/Template/TemplateManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,11 @@ public function initializeTemplateDirectory(string $path = null, string $userId
$isDefaultTemplates = $skeletonTemplatePath === $defaultTemplateDirectory;
$userLang = $this->l10nFactory->getUserLanguage($this->userManager->get($this->userId));

if (empty($skeletonTemplatePath)) {
$this->setTemplatePath('');
return $this->getTemplatePath();
}

try {
$l10n = $this->l10nFactory->get('lib', $userLang);
$userFolder = $this->rootFolder->getUserFolder($this->userId);
Expand Down

0 comments on commit 33e0a10

Please sign in to comment.