Skip to content

Commit

Permalink
Merge pull request #42003 from nextcloud/backport/41995/stable26
Browse files Browse the repository at this point in the history
[stable26] fix(TemplateManager): Bail early if templatedirectory is empty
  • Loading branch information
blizzz authored Dec 4, 2023
2 parents 636c940 + 38d64e3 commit 9ca5c66
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 @@ -274,6 +274,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 9ca5c66

Please sign in to comment.