aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Template
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2021-01-26 21:32:23 +0100
committerJulius Härtl <jus@bitgrid.net>2021-01-28 12:00:20 +0100
commit01113815297b6f59b7eea96dcb55db2ec374e599 (patch)
tree6d377200d314ea1bd7968555febced188a368ce2 /lib/private/Files/Template
parent4f90766ba314171bbfc78d1e988307c50633e7f3 (diff)
downloadnextcloud-server-01113815297b6f59b7eea96dcb55db2ec374e599.tar.gz
nextcloud-server-01113815297b6f59b7eea96dcb55db2ec374e599.zip
Only create template directory if it is present in the default skeleton
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib/private/Files/Template')
-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);