mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-23 10:07:48 -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
@@ -9,7 +9,7 @@ from collections.abc import Callable
|
||||
from dataclasses import dataclass
|
||||
from pathlib import Path
|
||||
|
||||
from core.hashing import compute_hashes
|
||||
from core.hashing import file_digest
|
||||
from model.largefiles import LARGE_FILES_RELEASE, LARGE_FILES_REPO, asset_names, registered_paths
|
||||
from release.assets import compare, expected_assets, expected_digests, fetch_release
|
||||
|
||||
@@ -28,7 +28,7 @@ class Upload:
|
||||
|
||||
|
||||
def sha1_of(path: Path) -> str:
|
||||
return compute_hashes(path, frozenset({"sha1"}), cache=False)["sha1"]
|
||||
return file_digest(path)
|
||||
|
||||
|
||||
def database_sha1(db: dict) -> dict[str, str]:
|
||||
|
||||
Reference in new issue
Block a user