Create missing directory.

This commit is contained in:
SimonFair
2024-02-09 08:52:45 +00:00
parent dc7b52e027
commit 7dda0f48d0
@@ -2520,6 +2520,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));
// Fire off the vnc/spice popup if available
$reply = ['success' => true];