Skip to content

Commit

Permalink
use std::filesystem::is_regular_file() instead of GetFileAttributesW()
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosalie241 committed Sep 27, 2023
1 parent 064c016 commit 20f16a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion SporeAutoSave/Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace Config
ConfigPath += "\\SporeAutoSave.ini";

// create config file when it doesn't exist
if (GetFileAttributesW(ConfigPath.wstring().c_str()) == INVALID_FILE_ATTRIBUTES)
if (!std::filesystem::is_regular_file(ConfigPath))
{
return SetValue(L"IntervalInMinutes", L"10") &&
SetValue(L"MaximumAmountOfBackupSaves", L"5");
Expand Down

0 comments on commit 20f16a2

Please sign in to comment.