diff --git a/backend/config.py b/backend/config.py index 959731c6..0cbce59d 100644 --- a/backend/config.py +++ b/backend/config.py @@ -89,6 +89,14 @@ def resolve_storage_path(path: str | Path | None) -> Path | None: return stored_path + # 0.3.0 records sometimes stored relative paths with the data-dir name + # baked in (e.g. "data/profiles/..."). Joining those directly with + # _data_dir produces a spurious "/data/profiles/..." nest. + if stored_path.parts and stored_path.parts[0] == "data": + stored_path = ( + Path(*stored_path.parts[1:]) if len(stored_path.parts) > 1 else Path() + ) + return (_data_dir / stored_path).resolve()