From 7334a693712c3861d1cb24d80e89c8a0118137ac Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Thu, 13 Jun 2024 01:41:22 -0700 Subject: [PATCH] fix that --- system/athena/athenad.py | 4 ++-- system/loggerd/uploader.py | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/system/athena/athenad.py b/system/athena/athenad.py index 2fb2cacc43..c7f8da8f5d 100755 --- a/system/athena/athenad.py +++ b/system/athena/athenad.py @@ -105,7 +105,7 @@ cur_upload_items: dict[int, UploadItem | None] = {} def strip_zstd_extension(fn: str) -> str: - if fn.endswith('.zstd'): + if fn.endswith('.zst'): return fn[:-4] return fn @@ -284,7 +284,7 @@ def _do_upload(upload_item: UploadItem, callback: Callable = None) -> requests.R path = upload_item.path compress = False - # If file does not exist, but does exist without the .zstd extension we will compress on the fly + # If file does not exist, but does exist without the .zst extension we will compress on the fly if not os.path.exists(path) and os.path.exists(strip_zstd_extension(path)): path = strip_zstd_extension(path) compress = True diff --git a/system/loggerd/uploader.py b/system/loggerd/uploader.py index 7f3a007762..e34a923d62 100755 --- a/system/loggerd/uploader.py +++ b/system/loggerd/uploader.py @@ -84,7 +84,7 @@ class Uploader: self.last_filename = "" self.immediate_folders = ["crash/", "boot/"] - self.immediate_priority = {"qlog": 0, "qlog.zstd": 0, "qcamera.ts": 1} + self.immediate_priority = {"qlog": 0, "qlog.zst": 0, "qcamera.ts": 1} def list_upload_files(self, metered: bool) -> Iterator[tuple[str, str, str]]: r = self.params.get("AthenadRecentlyViewedRoutes", encoding="utf8") @@ -153,7 +153,7 @@ class Uploader: with open(fn, "rb") as f: data: BinaryIO - if key.endswith('.zstd') and not fn.endswith('.zstd'): + if key.endswith('.zst') and not fn.endswith('.zst'): compressed = zstd.compress(f.read(), LOG_COMPRESSION_LEVEL) data = io.BytesIO(compressed) else: @@ -219,8 +219,8 @@ class Uploader: name, key, fn = d # qlogs and bootlogs need to be compressed before uploading - if key.endswith(('qlog', 'rlog')) or (key.startswith('boot/') and not key.endswith('.zstd')): - key += ".zstd" + if key.endswith(('qlog', 'rlog')) or (key.startswith('boot/') and not key.endswith('.zst')): + key += ".zst" return self.upload(name, key, fn, network_type, metered)