Use standalone filesystem functions instead

The member variants do not exist in experimental filesystem implementations.
This commit is contained in:
Kawe Mazidjatari 2023-03-20 00:19:17 +01:00
parent dd48093c23
commit cdb03a5d97
2 changed files with 3 additions and 3 deletions

View File

@ -19,7 +19,7 @@ void CPluginSystem::PluginSystem_Init()
for (auto& it : fs::directory_iterator("bin\\x64_retail\\plugins"))
{
if (!it.is_regular_file())
if (!fs::is_regular_file(it))
continue;
if (auto path = it.path(); path.has_filename() && path.has_extension() && path.extension().compare(".dll") == 0)

View File

@ -115,7 +115,7 @@ vector<VPKKeyValues_t> CPackedStore::GetEntryValues(const string& svWorkspace) c
{
dir.disable_recursion_pending(); // Skip all ignored folders and extensions.
}
else if (dir->file_size() > 0) // Empty files are not supported.
else if (fs::file_size(*dir) > 0) // Empty files are not supported.
{
const string svEntryPath = dir->path().u8string();
if (!GetExtension(svEntryPath).empty())
@ -165,7 +165,7 @@ vector<VPKKeyValues_t> CPackedStore::GetEntryValues(const string& svWorkspace, K
if (pEntryKV)
{
if (!dir->file_size()) // Empty files are not supported.
if (!file_size(*dir)) // Empty files are not supported.
{
Warning(eDLL_T::FS, "File '%s' listed in build manifest appears truncated\n", dir->path().relative_path().u8string().c_str());
}