diff --git a/packages/hal/PKGBUILD b/packages/hal/PKGBUILD index a4d293c..6312a82 100644 --- a/packages/hal/PKGBUILD +++ b/packages/hal/PKGBUILD @@ -2,7 +2,7 @@ pkgname=hal pkgver=0.2.0 -pkgrel=2 +pkgrel=3 pkgdesc="HAL 9000 — Antergos NeXT Package Manager. Dual-mode: wrapper (pacman) or native (standalone)." arch=('any') url="https://github.com/Antergos-NeXT" diff --git a/packages/hal/__pycache__/halcpython-314.pyc b/packages/hal/__pycache__/halcpython-314.pyc index 38e8e78..12c68bc 100644 Binary files a/packages/hal/__pycache__/halcpython-314.pyc and b/packages/hal/__pycache__/halcpython-314.pyc differ diff --git a/packages/hal/hal b/packages/hal/hal index b624c02..da684e7 100755 --- a/packages/hal/hal +++ b/packages/hal/hal @@ -367,10 +367,19 @@ def load_sync_dbs() -> Dict[str, dict]: for db_path in sorted(SYNC_DIR.glob("*.db")): try: with open(db_path, "rb") as f: - import zstandard - dctx = zstandard.ZstdDecompressor() - with dctx.stream_reader(f) as reader: - with tarfile.open(fileobj=reader, mode="r|") as tar: + header = f.read(4) + f.seek(0) + reader = None + if header[:4] == b"\x28\xb5\x2f\xfd": + import zstandard + dctx = zstandard.ZstdDecompressor() + reader = dctx.stream_reader(f) + elif header[:2] == b"\x1f\x8b": + import gzip + reader = gzip.GzipFile(fileobj=f) + else: + reader = f + with tarfile.open(fileobj=reader, mode="r|") as tar: current_dir = None entry_data = {} for member in tar: