mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Merge branch 'pretzel-windows' into 'dev'
Fix Windows bug on server restore See merge request crafty-controller/crafty-commander!104
This commit is contained in:
commit
e914f93ab5
@ -361,6 +361,9 @@ class Controller:
|
||||
backup_path_components = list(backup_path.parts)
|
||||
backup_path_components[-1] = new_uuid
|
||||
new_bu_path = pathlib.PurePath(os.path.join(*backup_path_components))
|
||||
if os.path.isdir(new_bu_path):
|
||||
if helper.validate_traversal(helper.backup_path, new_bu_path):
|
||||
os.rmdir(new_bu_path)
|
||||
backup_path.rename(new_bu_path)
|
||||
|
||||
def register_server(self, name: str, server_uuid: str, server_dir: str, backup_path: str, server_command: str, server_file: str, server_log_file: str, server_stop: str, server_port: int):
|
||||
|
Loading…
Reference in New Issue
Block a user