diff --git a/lib/private/Files/Template/TemplateManager.php b/lib/private/Files/Template/TemplateManager.php index 28e9e4f69e878..d8112b1fa6498 100644 --- a/lib/private/Files/Template/TemplateManager.php +++ b/lib/private/Files/Template/TemplateManager.php @@ -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);