Apply a StoragePath change without restarting Resonite #9

Open
opened 2026-10-07 00:11:09 +02:00 by kyuubi · 2 comments
Owner

Changing StoragePath in the MonkeyLoader settings does nothing until Resonite restarts. The folder is read once in OnEngineReady, and LocalInventory keeps its layout, asset store and index in statics from then on.

Plan

  • Group the per-folder state (layout, asset store, index, clean-up queue and first-pass sweep) into one object per storage folder
  • Switch to the new folder when StoragePath changes; switching back reuses the earlier folder object, so one folder never has two store locks
  • Saves, copies and deletes that started before a switch finish in the folder they started in: commit, open and clean-up pick the folder that holds the file, and a listed inventory folder keeps acting on the storage folder it was listed from
  • Reopen the dash inventory at the new Local Storage root if it is showing Local Storage
  • A folder that can't be created keeps the current one, logs the error and shows a notification
  • Drop "needs a restart" from the setting description and the README
  • Tests for picking the folder that holds a path, build, test (85 passed, 1 skipped without RLS_ROUNDTRIP_DIR)
  • Verify in game: switch the path with the inventory open on Local Storage, switch back, try a path that can't be created
Changing `StoragePath` in the MonkeyLoader settings does nothing until Resonite restarts. The folder is read once in `OnEngineReady`, and `LocalInventory` keeps its layout, asset store and index in statics from then on. ## Plan - [x] Group the per-folder state (layout, asset store, index, clean-up queue and first-pass sweep) into one object per storage folder - [x] Switch to the new folder when `StoragePath` changes; switching back reuses the earlier folder object, so one folder never has two store locks - [x] Saves, copies and deletes that started before a switch finish in the folder they started in: commit, open and clean-up pick the folder that holds the file, and a listed inventory folder keeps acting on the storage folder it was listed from - [x] Reopen the dash inventory at the new Local Storage root if it is showing Local Storage - [x] A folder that can't be created keeps the current one, logs the error and shows a notification - [x] Drop "needs a restart" from the setting description and the README - [x] Tests for picking the folder that holds a path, build, test (85 passed, 1 skipped without `RLS_ROUNDTRIP_DIR`) - [ ] Verify in game: switch the path with the inventory open on Local Storage, switch back, try a path that can't be created
Author
Owner

Implemented in 6006aab and installed into MonkeyLoader/Mods. Waiting on an in-game check after one restart to load the build.

Implemented in 6006aab and installed into MonkeyLoader/Mods. Waiting on an in-game check after one restart to load the build.
Author
Owner

Correction: no restart needed. MonkeyLoader hot-reloaded the replaced package at 00:16:06 (log: Loaded patcher assembly: ResoLocalStorage-639269217662913896, then Local storage folder: …). Waiting on the in-game check.

Correction: no restart needed. MonkeyLoader hot-reloaded the replaced package at 00:16:06 (log: `Loaded patcher assembly: ResoLocalStorage-639269217662913896`, then `Local storage folder: …`). Waiting on the in-game check.
kyuubi referenced this issue from a commit 2026-10-07 00:22:43 +02:00
Sign in to join this conversation.
No labels
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
kyuubi/ResoLocalStorage#9
No description provided.