TASEmulators / TASEmulators/BizHawk

Avoid autosaving backup movies if the movie hasn't changed since last backup

Open
#4,660 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

App: EmuHawk
Dominant language
C#
Stars
2.8k
Forks
468
PR merge metrics
No merged PRs in 30d

Description

The autosave logic works assuming that an autosave ends up clearing out the Changes flag, avoiding unneeded autosaves. However, that flag is not cleared out if we're autosaving a backup file rather than movie file itself, as the flag is only meant for "changes since last save." So if say someone decides to leave their computer on and go to bed, autosave will keep creating backup files. For bk2 backups, this is probably okay in practice (since they're so tiny), although it might be more problematic for tasproj backups as they'll be quite larger given they hold branches (and each branch as a state attached to them). Should probably be as simple as adding another flag for "changes since last autosave"? (or maybe we consider this the user being AFK and autosaving outright at that point?)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating BizHawk's autosave logic and the handling of the Changes flag, then compare the paths for movie files, bk2 backups, and tasproj backups. Determine how the code can identify whether a backup needs updating, and consider the issue resolved when unchanged movies no longer create repeated backup files during autosave.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.