Create folder for Ubisoft auth files (Fixes #5011)

This commit is contained in:
Mathieu Comandon 2023-09-06 19:54:10 -07:00
parent b88f9b9612
commit 3c6245546c

View file

@ -167,6 +167,8 @@ class UbisoftConnectService(OnlineService):
return ubi_games
def store_credentials(self, credentials):
if not os.path.exists(os.path.dirname(self.token_path)):
os.mkdir(os.path.dirname(self.token_path))
with open(self.token_path, "w", encoding='utf-8') as auth_file:
auth_file.write(json.dumps(credentials, indent=2))