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 nextcloud#39266

Signed-off-by: Marcel Klehr <[email protected]>
  • Loading branch information
marcelklehr authored and zak39 committed Dec 19, 2023
1 parent a40b00e commit f0ab94d
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 ($skeletonTemplatePath === '') {
$this->setTemplatePath('');
return '';
}

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

0 comments on commit f0ab94d

Please sign in to comment.