mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-12-02 06:18:51 -06:00
Identification, the atom pool and capture opened database paths against the working directory while the build read them under the parent of --bios-dir. Against a worktree copy the pool dropped every loose ROM and the survey read the main checkout. romrecipes.collection now holds the one rule and every reader goes through it, select included.
16 lines
487 B
Python
16 lines
487 B
Python
"""Where a database.json path lands on disk: under the folder that holds the BIOS tree."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from pathlib import Path
|
|
|
|
|
|
def collection_root(bios_dir: Path) -> Path:
|
|
"""The folder database paths (``bios/...``) are relative to: *bios_dir*'s parent."""
|
|
return bios_dir.resolve().parent
|
|
|
|
|
|
def on_disk(root: Path, path: str) -> Path:
|
|
"""The file a database *path* names under *root*. An absolute path stays as written."""
|
|
return root / path
|