Files
willmiao-ComfyUI-Lora-Manager/tests/utils
Will Miao 255459f8f1 fix(scan): never register or hash a zero-byte model file
A file whose directory entry reports zero bytes hashes to the SHA256 of an
empty byte string. That value is shared by every unread or still-being-written
file: the library collapses them into one bogus duplicate group and every
member resolves to the same polluted remote entry (#1162).

- _calculate_sha256_sync returns "" when the read yields no bytes, so no
  caller can persist the placeholder as a real hash
- create_default_metadata refuses to create a sidecar for an empty file
- ModelScanner._process_model_file skips zero-byte files before loading or
  creating metadata, leaving them unmanaged until they have content
- a file whose metadata cannot be created no longer aborts the scan via assert
2026-10-25 19:33:13 +08:00
..