Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix(TemplateManager): Bail early if templatedirectory is empty
fixes #39266

Signed-off-by: Marcel Klehr <[email protected]>
  • Loading branch information
marcelklehr authored and backportbot-nextcloud[bot] committed Dec 4, 2023
commit 76265de3f15402ae2597e59e586f3b452eb7b26f
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