Skip to content

Commit 45359c5

Browse files
authored
fix(sts2): create mods directory if missing (#217)
1 parent 67cdd4f commit 45359c5

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

games/game_sts2.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def __init__(self):
3030
class SlayTheSpire2Game(BasicGame):
3131
Name = "Slay the Spire 2 Support Plugin"
3232
Author = "Azlle"
33-
Version = "1.0.0"
33+
Version = "1.0.1"
3434

3535
GameName = "Slay the Spire 2"
3636
GameShortName = "slaythespire2"
@@ -46,6 +46,11 @@ def init(self, organizer: mobase.IOrganizer) -> bool:
4646
self._register_feature(SlayTheSpire2ModDataChecker())
4747
return True
4848

49+
def initializeProfile(self, directory: QDir, settings: mobase.ProfileSetting):
50+
mods_path = Path(self.dataDirectory().absolutePath())
51+
mods_path.mkdir(exist_ok=True)
52+
super().initializeProfile(directory, settings)
53+
4954
def savesDirectory(self) -> QDir:
5055
docs = QDir(self.documentsDirectory())
5156
steam_dir = Path(docs.absoluteFilePath("steam"))

0 commit comments

Comments
 (0)