Fix saving of saves from other machines.

Need to reset the persisted save paths on load, since the file that was
loaded may have been moved since it was saved and the original location
may no longer be accessible.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2756.
This commit is contained in:
Dan Albert
2023-03-13 19:31:41 -07:00
parent 2d9b0177ec
commit bc0dacf974
4 changed files with 50 additions and 3 deletions

View File

@@ -4,11 +4,13 @@ from typing import cast
import pytest
from game import Game
from game.persistence import SaveManager
class StubGame:
def __init__(self) -> None:
self.date = datetime.date.min
self.save_manager = SaveManager(cast(Game, self))
@pytest.fixture