Fix Windows file rename error | Generated by AI
Summary of the fix:
- Root cause:
tmp.rename(qf)usesos.rename()under the hood, which on Windows refuses to overwrite an existing file (raisingFileExistsError). On POSIX (macOS/Linux),rename()atomically replaces the target — but not on Windows. - Fix: Replaced
tmp.rename(qf)withos.replace(tmp, qf). Theos.replace()function is explicitly designed as the cross-platform equivalent — it atomically replaces the destination file on both POSIX and Windows. - Also added the
import osstatement that was missing.
You can now run uv run ww note process again — the mark_done → _save_queue path should work on Windows without the FileExistsError.
