Merge pull request #1614 from SimonFair/User-VM-templates

VM templates Create missing directory.
This commit is contained in:
tom mortensen
2024-02-09 12:26:25 -08:00
committed by GitHub

View File

@@ -2522,6 +2522,7 @@ function addtemplatexml($post) {
'os' => $usertemplate['template']['os'],
'overrides' => $usertemplate
];
if (!is_dir(dirname($templateslocation))) mkdir(dirname($templateslocation));
file_put_contents($templateslocation,json_encode($savedtemplates,JSON_PRETTY_PRINT));
$reply = ['success' => true];