mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-02 01:59:46 +08:00
load_run() read .indexing-run.json and .indexing-cancel.json with a bare Path.read_text(), so a brief Windows sharing lock (antivirus, indexer, a concurrent reader) failed the safety check at once with "Indexing journal is unreadable", and the locale default encoding garbled or rejected the UTF-8 that atomic_write_json writes (a document named "ÁLGEBRA.pdf" makes every check fail under cp1252). Add file_io.read_text(), which reads UTF-8 and shares the bounded PermissionError backoff already used by _atomic_replace(). Missing files, corrupt JSON and locks that outlast the backoff keep their existing behaviour. Closes #1912