diff --git a/CHANGELOG.md b/CHANGELOG.md index eb9bc75bd6f2f0623056a025fbdfe82317ab61b6..343728f7c68fca8ebb25a7c0e68f55c6aa60c9c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ - Fix import directory cleanup was not pointing to the proper directory ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/918)) - Fix survey not appearing on first login ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/917)) - Fix failue deleting server's DB files on server delete ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/916)) -- Fix server.properties overwritten in bedrock update ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/915)) +- Fix server.properties overwritten in bedrock update ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/915) | [Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/919)) - Fix zip backup download button always downloading the most recent, not the selected backup ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/913)) - Fix download button showing for snapshot backups ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/913)) ### Tweaks diff --git a/app/classes/shared/import_helper.py b/app/classes/shared/import_helper.py index a43e63880d4d7af41665414b433c6cc4a3d1f841..213fec1ab490b2a1ed1b474e185a6fde804757aa 100644 --- a/app/classes/shared/import_helper.py +++ b/app/classes/shared/import_helper.py @@ -222,7 +222,9 @@ class ImportHelpers: ) download_thread.start() - def download_threaded_bedrock_server(self, path, new_id, bedrock_url): + def download_threaded_bedrock_server( + self, path, new_id, bedrock_url, server_update=False + ): """ Downloads the latest Bedrock server, unzips it, sets necessary permissions. @@ -244,7 +246,7 @@ class ImportHelpers: unzip_path = self.helper.wtol_path(file_path) # unzips archive that was downloaded. - self.file_helper.unzip_file(unzip_path, True) + self.file_helper.unzip_file(unzip_path, server_update) # adjusts permissions for execution if os is not windows if not self.helper.is_os_windows(): diff --git a/app/classes/shared/server.py b/app/classes/shared/server.py index 51dac292dc884b439b6dd22be59f069091ba8edd..419839c02bbbc30bdffd27493f6a58e72a74c5d6 100644 --- a/app/classes/shared/server.py +++ b/app/classes/shared/server.py @@ -1499,7 +1499,7 @@ class ServerInstance: if bedrock_url: # Use the new method for secure download self.import_helper.download_threaded_bedrock_server( - self.settings["path"], self.server_id, bedrock_url + self.settings["path"], self.server_id, bedrock_url, True ) downloaded = True except Exception as e: