mirror of
https://github.com/NCBM/plyngent.git
synced 2026-11-07 15:37:55 +08:00
c9815e32bb
edit_lineno now rejects edits when the file changed since the numbered read (mtime recorded at read time), so stale line numbers are caught even when the mutation came from run_argv / an external process — the class the explicit invalidations could never cover. This lets write_file / edit_replace / edit_lineno drop their explicit invalidate calls (the write itself changes the mtime, and the error is now the accurate "changed since it was read" instead of a misleading "not read"). copy/move keep explicit invalidation because shutil preserves the source mtime, which the freshness check cannot see.