mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-28 06:37:24 -05:00
fix: keep Batocera's save files apart from bios/
batocera-systems lists bios/saves/dolphin-emu/Triforce/segaboot.gcm, so the pack folder for the save directory is userdata-saves/. validate_schemas refuses a pack folder the BIOS tree already uses.
This commit is contained in:
1 parent
8db393f415
commit
bf22f1da47
7 files changed
+72
-7
No files matched your search
+20
-1
@@ -134,7 +134,7 @@ class ThePlatformNamesItsSaveDirectory(unittest.TestCase):
|
||||
|
||||
platforms = str(REPO_ROOT / "platforms")
|
||||
expected = {
|
||||
"batocera": SaveLayout("saves", False, True),
|
||||
"batocera": SaveLayout("saves", False, True, pack_folder="userdata-saves"),
|
||||
"knulli": SaveLayout("saves", False, True),
|
||||
"recalbox": SaveLayout("saves", False, True),
|
||||
"retrodeck": SaveLayout("saves", False, True),
|
||||
@@ -168,6 +168,25 @@ class ThePlatformNamesItsSaveDirectory(unittest.TestCase):
|
||||
"saves/wii/dolphin-emu/User/GBA/gba_bios.bin",
|
||||
)
|
||||
|
||||
def test_a_pack_folder_apart_from_the_bios_tree(self):
|
||||
"""Batocera's BIOS tree has a saves/ of its own: the pack keeps the
|
||||
save directory's files in another folder, the installer still
|
||||
writes them to /userdata/saves."""
|
||||
layout = save_layout({"save_directory": {
|
||||
"folder": "saves", "by_core": False, "by_system": True,
|
||||
"pack_folder": "userdata-saves"}})
|
||||
self.assertEqual(layout.in_pack, "userdata-saves")
|
||||
self.assertEqual(save_destination("stella/KVS1.WAV", None, layout, "atari2600"),
|
||||
"userdata-saves/atari2600/stella/KVS1.WAV")
|
||||
self.assertEqual(SaveLayout("saves", True).in_pack, "saves")
|
||||
try:
|
||||
from validate_schemas import _bios_tree_below
|
||||
except ImportError:
|
||||
self.skipTest("validate_schemas needs jsonschema")
|
||||
self.assertEqual(_bios_tree_below("batocera", "saves"),
|
||||
"saves/dolphin-emu/Triforce/segaboot.gcm")
|
||||
self.assertEqual(_bios_tree_below("batocera", "userdata-saves"), "")
|
||||
|
||||
def test_the_systems_a_core_runs_for(self):
|
||||
from packpaths import libretro_systems
|
||||
|
||||
|
||||
Reference in new issue
Block a user