mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-24 10:37:54 -06:00
refactor: release tools read file_digest
core.hashing.file_digest is the streamed loop the release tools carried, byte for byte: 1 MiB reads, read again each call. It replaces compute_hashes with cache=False there.
This commit is contained in:
1 parent
27bff61560
commit
ba692da94f
4 files changed
+11
-9
No files matched your search
@@ -7,7 +7,7 @@ import subprocess
|
||||
from dataclasses import dataclass
|
||||
from pathlib import Path
|
||||
|
||||
from core.hashing import compute_hashes
|
||||
from core.hashing import file_digest
|
||||
from release.assets import digests_of
|
||||
from model.largefiles import LARGE_FILES_REPO
|
||||
|
||||
@@ -114,7 +114,7 @@ def compare_release(
|
||||
|
||||
|
||||
def _sha256(path: Path) -> str:
|
||||
return compute_hashes(path, frozenset({"sha256"}), cache=False)["sha256"]
|
||||
return file_digest(path, "sha256")
|
||||
|
||||
|
||||
def fetch_assets(tag: str) -> tuple[dict[str, Asset], bool]:
|
||||
|
||||
Reference in new issue
Block a user