mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2025-04-28 21:37:58 +03:00
Make status success by default or on file not existing
This commit is contained in:
parent
f57d0ba49a
commit
f160be4bba
4 changed files with 4 additions and 14 deletions
|
@ -100,10 +100,7 @@ bool AchievementManager::LoadBinary()
|
||||||
dataPath = GetDataPath(false);
|
dataPath = GetDataPath(false);
|
||||||
|
|
||||||
if (!std::filesystem::exists(dataPath))
|
if (!std::filesystem::exists(dataPath))
|
||||||
{
|
return true;
|
||||||
BinStatus = EAchBinStatus::NoFile;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::error_code ec;
|
std::error_code ec;
|
||||||
|
|
|
@ -4,9 +4,7 @@
|
||||||
|
|
||||||
enum class EAchBinStatus
|
enum class EAchBinStatus
|
||||||
{
|
{
|
||||||
Unknown,
|
|
||||||
Success,
|
Success,
|
||||||
NoFile,
|
|
||||||
IOError,
|
IOError,
|
||||||
BadFileSize,
|
BadFileSize,
|
||||||
BadSignature,
|
BadSignature,
|
||||||
|
@ -18,7 +16,7 @@ class AchievementManager
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static inline AchievementData Data{};
|
static inline AchievementData Data{};
|
||||||
static inline EAchBinStatus BinStatus{ EAchBinStatus::Unknown };
|
static inline EAchBinStatus BinStatus{ EAchBinStatus::Success };
|
||||||
|
|
||||||
static std::filesystem::path GetDataPath(bool checkForMods)
|
static std::filesystem::path GetDataPath(bool checkForMods)
|
||||||
{
|
{
|
||||||
|
|
|
@ -46,10 +46,7 @@ bool PersistentStorageManager::LoadBinary()
|
||||||
dataPath = GetDataPath(false);
|
dataPath = GetDataPath(false);
|
||||||
|
|
||||||
if (!std::filesystem::exists(dataPath))
|
if (!std::filesystem::exists(dataPath))
|
||||||
{
|
return true;
|
||||||
BinStatus = EExtBinStatus::NoFile;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::error_code ec;
|
std::error_code ec;
|
||||||
|
|
|
@ -4,9 +4,7 @@
|
||||||
|
|
||||||
enum class EExtBinStatus
|
enum class EExtBinStatus
|
||||||
{
|
{
|
||||||
Unknown,
|
|
||||||
Success,
|
Success,
|
||||||
NoFile,
|
|
||||||
IOError,
|
IOError,
|
||||||
BadFileSize,
|
BadFileSize,
|
||||||
BadSignature,
|
BadSignature,
|
||||||
|
@ -17,7 +15,7 @@ class PersistentStorageManager
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static inline PersistentData Data{};
|
static inline PersistentData Data{};
|
||||||
static inline EExtBinStatus BinStatus{ EExtBinStatus::Unknown };
|
static inline EExtBinStatus BinStatus{ EExtBinStatus::Success };
|
||||||
|
|
||||||
static std::filesystem::path GetDataPath(bool checkForMods)
|
static std::filesystem::path GetDataPath(bool checkForMods)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue