Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2021-01-26 23:32:23 +0300
committerJulius Härtl <jus@bitgrid.net>2021-01-28 14:00:20 +0300
commit01113815297b6f59b7eea96dcb55db2ec374e599 (patch)
tree6d377200d314ea1bd7968555febced188a368ce2
parent4f90766ba314171bbfc78d1e988307c50633e7f3 (diff)
Only create template directory if it is present in the default skeleton
Signed-off-by: Julius Härtl <jus@bitgrid.net>
-rw-r--r--lib/private/Files/Template/TemplateManager.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/private/Files/Template/TemplateManager.php b/lib/private/Files/Template/TemplateManager.php
index 808c0fbb999..1942f83b86c 100644
--- a/lib/private/Files/Template/TemplateManager.php
+++ b/lib/private/Files/Template/TemplateManager.php
@@ -256,7 +256,10 @@ class TemplateManager implements ITemplateManager {
// Initial user setup without a provided path
if ($path === null) {
// All locations are default so we just need to rename the directory to the users language
- if ($isDefaultSkeleton && $isDefaultTemplates && $userFolder->nodeExists('Templates')) {
+ if ($isDefaultSkeleton && $isDefaultTemplates) {
+ if (!$userFolder->nodeExists('Templates')) {
+ return '';
+ }
$newPath = $userFolder->getPath() . '/' . $userTemplatePath;
if ($newPath !== $userFolder->get('Templates')->getPath()) {
$userFolder->get('Templates')->move($newPath);