Fix bug where no backup dir would exist on clone

This commit is contained in:
Andrew 2022-04-12 17:17:12 -04:00
parent d417950eae
commit 12b0f8326d
2 changed files with 8 additions and 3 deletions

View File

@ -219,6 +219,7 @@ class ServerHandler(BaseHandler):
new_server_log_file = str(
Helpers.get_os_understandable_path(server_data.get("log_path"))
).replace(server_uuid, new_server_uuid)
backup_path = os.path.join(self.helper.backup_path, new_server_uuid)
server_port = server_data.get("server_port")
server_type = server_data.get("type")
@ -226,7 +227,7 @@ class ServerHandler(BaseHandler):
new_server_name,
new_server_uuid,
new_server_path,
"",
backup_path,
new_server_command,
new_executable,
new_server_log_file,

View File

@ -588,11 +588,15 @@
$(".clone_button").click(function () {
server_id = $(this).attr("data-id");
send_command(server_id, 'clone_server');
bootbox.alert({
bootbox.dialog({
backdrop: true,
title: '{% raw translate("dashboard", "sendingCommand", data["lang"]) %}',
message: '<div align="center"><i class="fas fa-spin fa-spinner"></i> &nbsp; {% raw translate("dashboard", "bePatientClone", data["lang"]) %} </div>'
message: '<div align="center"><i class="fas fa-spin fa-spinner"></i> &nbsp; {% raw translate("dashboard", "bePatientClone", data["lang"]) %} </div>',
closeButton: false,
});
setTimeout(function () {
location.reload();
}, 5000)
});
});