mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Only create template directory if it is present in the default skeleton
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
4f90766ba3
commit
0111381529
1 changed files with 4 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue