#1315: Report Bug keeps every filed report across relogs, on Windows too #1395

Manually merged
sky_line merged 0 commits from TheSlowly/Slipstream:report-history-1315 into main 2026-11-02 23:48:19 +00:00
Collaborator

Fixes #1315.

On Windows the report list's save renamed a temp file over the old list, which fails once the list exists, so only the first report ever reached disk. Saves now use LLFile::replace(), and load recovers the newest list from the leftover .tmp. The effects stack state, local asset list and updater state files had the same problem and are fixed too.

Fixes #1315. On Windows the report list's save renamed a temp file over the old list, which fails once the list exists, so only the first report ever reached disk. Saves now use LLFile::replace(), and load recovers the newest list from the leftover .tmp. The effects stack state, local asset list and updater state files had the same problem and are fixed too.
The report list was saved by writing filed_reports.xml.tmp and renaming it
over filed_reports.xml. On Windows rename() can't overwrite an existing file,
so only the first report ever reached disk and every later save stayed in
the .tmp. After a relog My Reports showed only that first report.

Save now uses LLFile::replace(). Load reads the leftover .tmp first when it
parses, since it holds the newest complete list, so reports lost to the old
save come back. Three other saves had the same rename-over-existing problem
and now use replace() too: the effects stack state (fx_state.xml), the local
asset list, and the updater's state files.

Test-Plan: Windows. With an existing filed_reports.xml.tmp from an older build,
  log in: Help > Report Bug > My Reports lists all earlier reports and the
  log says "Recovered the report list". File a report, relog: both the old
  ones and the new one are listed, and no .tmp is left in user_settings.
  Change the effects stack, relog: the change is kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With replace() the swap now always succeeds, so a short write (disk full)
would have replaced a good list with a truncated one that fails to load.
The report list and the effects stack state now check the write before
swapping it in; the local asset list and updater already did.

When the swap itself fails, the report list keeps its complete .tmp so the
next load picks it up, instead of deleting the newest save.

Recovery from an older build's leftover .tmp is narrower than the first
commit said: older builds rewrote the .tmp from the stale main list on every
login (the status poll saves), so it only brings back reports filed in the
last session before updating. Comment corrected.

Test-Plan: Windows. Log in, wait about two minutes for the status poll:
  filed_reports.xml has a fresh timestamp and no filed_reports.xml.tmp is
  left in user_settings. My Reports still lists the existing reports.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sky_line manually merged commit 4d612087eb into main 2026-11-02 23:48:19 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sky_line/Slipstream!1395
No description provided.