Skip to content

Commit

Permalink
Fix using save dates from folder instead of file
Browse files Browse the repository at this point in the history
  • Loading branch information
ZashIn committed Oct 9, 2023
1 parent 7d5fa69 commit d8f68d0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion games/game_cyberpunk2077.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from pathlib import Path

import mobase
from PyQt6.QtCore import QDir, qInfo
from PyQt6.QtCore import QDateTime, QDir, qInfo

from ..basic_features import BasicLocalSavegames, BasicModDataChecker, GlobPatterns
from ..basic_features.basic_save_game_info import (
Expand Down Expand Up @@ -192,6 +192,11 @@ def __init__(self, filepath: Path):
def getName(self) -> str:
return self._name or super().getName()

def getCreationTime(self) -> QDateTime:
return QDateTime.fromSecsSinceEpoch(
int((self._filepath / "sav.dat").stat().st_mtime)
)


class Cyberpunk2077Game(BasicGame):
Name = "Cyberpunk 2077 Support Plugin"
Expand Down

0 comments on commit d8f68d0

Please sign in to comment.