From ba588820fabb10f41760f7b520cf7a26d954fafa Mon Sep 17 00:00:00 2001 From: ShyAssassin <49711232+ShyAssassin@users.noreply.github.com> Date: Mon, 11 Sep 2023 14:57:36 +0200 Subject: [PATCH] fix: newer backup configs replace older ones --- TrackingBackend/app/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TrackingBackend/app/config.py b/TrackingBackend/app/config.py index 8f1a22a..1eec099 100644 --- a/TrackingBackend/app/config.py +++ b/TrackingBackend/app/config.py @@ -163,7 +163,7 @@ def load(self, file: str = CONFIG_FILE) -> EyeTrackConfig: if type(e) is ValidationError: logger.error(f"Invalid data found in config\n{e}") logger.critical("Config is corrupted, creating backup and regenerating") - os.rename(file, f"{file}.backup") + os.replace(file, f"{file}.backup") except PermissionError: logger.error("Permission Denied, assuming config has lock, Retrying...") return self.load(file=file)