diff --git a/emhttp/plugins/dynamix.vm.manager/include/libvirt_helpers.php b/emhttp/plugins/dynamix.vm.manager/include/libvirt_helpers.php index 515d1b92e..834a9540d 100644 --- a/emhttp/plugins/dynamix.vm.manager/include/libvirt_helpers.php +++ b/emhttp/plugins/dynamix.vm.manager/include/libvirt_helpers.php @@ -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];