Skip to content

Commit

Permalink
Merge pull request #27021 from nextcloud/backport/26963/stable21
Browse files Browse the repository at this point in the history
[stable21] Fix log error when creating files from an empty template
  • Loading branch information
rullzer authored May 19, 2021
2 parents 51e2799 + 80cda3b commit 3306c2f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/private/Files/Template/TemplateManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ public function createFromTemplate(string $filePath, string $templateId = '', st
}
$folder = $userFolder->get(dirname($filePath));
$targetFile = $folder->newFile(basename($filePath));
$template = null;
if ($templateType === 'user' && $templateId !== '') {
$template = $userFolder->get($templateId);
$template->copy($targetFile->getPath());
Expand Down

0 comments on commit 3306c2f

Please sign in to comment.