mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-12-02 22:38:54 -06:00
refactor: name each variant by its md5 prefix
This commit is contained in:
1 parent
f6a509aacc
commit
ed3f61db5d
321 files changed
+97
-23
No files matched your search
@@ -65,7 +65,7 @@ def place_file(
|
||||
if dest.exists() and dest.read_bytes() != data:
|
||||
# Another revision under the same name: the collection keeps it
|
||||
# beside, never in place of, the file already there.
|
||||
dest = folder / ".variants" / f"{dest.name}.{sha1[:8]}"
|
||||
dest = folder / ".variants" / f"{dest.name}.{hashlib.md5(data).hexdigest()[:8]}"
|
||||
dest.parent.mkdir(parents=True, exist_ok=True)
|
||||
with open(dest, "wb") as f:
|
||||
f.write(data)
|
||||
|
||||
Reference in new issue
Block a user