Skip to content

Fix missed migration for save folder - #858

Open
aidankinzett wants to merge 4 commits into
nx2-experimentalfrom
nx2-exp/migration-paths
Open

aidankinzett wants to merge 4 commits into
nx2-experimentalfrom
nx2-exp/migration-paths

Conversation

@aidankinzett

@aidankinzett aidankinzett commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Migrating from Eden copied the old config as-is. Configs store data paths as absolute strings, so after migrating, NAND, SD, saves, mods, dumps and TAS kept using the old emulator's folder, and the Eglantine copy went stale.

  • Migration now rewrites paths under the old data folder to the Eglantine folder in the migrated ini files. Linked migrations are left alone.
  • Removed the post-migration rename in MainWindow. It replaced the emulator name with "eden", which no longer matches anything after the rename and never covered saves.
  • Moving the NAND folder in Settings > Filesystem left the save folder behind when saves were kept in the NAND. They now follow it.
  • For installs that already migrated: at startup, if a data path is still inside an old emulator's folder, Eglantine offers to copy it over (newer files win) and switch to it. The old folder is kept. Saying no turns the check off (check_legacy_paths).

Type of change

  • Bug fix
  • Game compatibility / game-support
  • Performance
  • New feature
  • Refactor / cleanup
  • CI / build
  • Documentation

Related issues

Fixes #813

Testing

  • Tested on Windows
  • Tested on Linux
  • Tested on macOS
  • Tested on NVIDIA
  • Tested on AMD
  • Tested on Intel

Games tested:

Not game-specific.

To test: migrate from a legacy eden folder with "Keep Old Data" and check that Settings > Filesystem shows Eglantine paths. Then, with an old config still pointing at eden, start the app, accept the prompt, and check that saves made after migrating carried over.

Checklist

  • I built it locally and it compiles without new warnings
  • I did not add any copyrighted game data, keys or firmware
  • Docs updated if needed
  • I added AI Disclosure if one was used

AI disclosure

I used Claude Opus 5.5 to trace the bug, draft the code and draft this description. I reviewed and tested the changes myself.

Screenshots / logs

image

Migration copied the old emulator's config as-is, and configs store data
paths as absolute strings, so NAND, SD, saves and the rest kept using the
old folder. Rewrite those paths in the migrated ini files instead of the
post-migration rename in MainWindow, which no longer matched any folder.

Moving the NAND directory in the filesystem settings also left saves kept
in the NAND behind; they now follow it.

Fixes #813
@coderabbitai

coderabbitai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ee6b85f0-dadd-464f-9b4e-0050ffa3c36e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@aidankinzett aidankinzett changed the title Nx2 exp/migration paths Fix missed migration for save folder Nov 13, 2026
Installs migrated before the config rewrite still use the old emulator's
folders, and anything saved since only exists there. At startup, if a data
path is inside an old emulator's folder (and it isn't a linked migration),
offer to copy it into Eglantine, newer files winning, and switch to it.
Declining turns off the check for good.
Clearing the shader cache recreated the shader folder with
create_directory, which throws when the Eglantine cache folder doesn't
exist yet. It only exists after migration if the old emulator had one, so
migrating without it aborted the app.
@aidankinzett
aidankinzett force-pushed the nx2-exp/migration-paths branch from 1ef7ea0 to c7cb2c7 Compare November 13, 2026 15:16
Copying the folders still in use into the Eglantine folder kept the
newer file, so a profiles.dat that Eglantine created on its own at
startup won over the user's real one. The folders in use now always
win.

Check for free space first, remove whatever was created if the copy
fails, show real progress, and stop Escape or the close button from
hiding the dialog while the GUI thread waits on the copy. Rewrite
migrated configs without throwing on the worker thread, and through a
temporary file so a failed write can't truncate them.

Ask after the translation is loaded, and don't claim the folders are
left over from a migration, since they may be shared on purpose.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working Eglantine-UI priority: high High priority

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant