Files
romm/backend
Sam DornanandClaude Opus 5.5 54bec6ed48 fix(scan): reuse unchanged empty files on quick scan (#4949)
* fix(scan): reuse unchanged empty files on quick scan

An empty file hashes to the default digest, which _make_file_hash stores
as a blank md5. rom_file_unchanged required a non-blank md5 on hashable
platforms, so an empty top-level file in a folder ROM (for example an
MSU-1 .msu) never counted as unchanged. The whole folder was re-hashed
and the ROM re-emitted on every quick scan, pushing it to the front of
Recently added.

Treat a zero-byte file as already hashed. Stored hashes stay blank so the
empty-input digest never feeds hash-based metadata matching.

Fixes #4933

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mre6qcBuXvGJzBJjJfkDvy

* docs(scan): name _make_file_hash as the source of blank empty-file hashes

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mre6qcBuXvGJzBJjJfkDvy

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-09-29 12:56:01 -05:00
..
2024-02-10 12:43:39 -05:00
2025-07-05 19:17:40 -04:00