From cdb03a5d976a96b131e2228025845d244c35ab67 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Mon, 20 Mar 2023 00:19:17 +0100 Subject: [PATCH] Use standalone filesystem functions instead The member variants do not exist in experimental filesystem implementations. --- r5dev/pluginsystem/pluginsystem.cpp | 2 +- r5dev/vpklib/packedstore.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/r5dev/pluginsystem/pluginsystem.cpp b/r5dev/pluginsystem/pluginsystem.cpp index ef90a1b7..79c414b6 100644 --- a/r5dev/pluginsystem/pluginsystem.cpp +++ b/r5dev/pluginsystem/pluginsystem.cpp @@ -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) diff --git a/r5dev/vpklib/packedstore.cpp b/r5dev/vpklib/packedstore.cpp index 04d633c6..e9985859 100644 --- a/r5dev/vpklib/packedstore.cpp +++ b/r5dev/vpklib/packedstore.cpp @@ -115,7 +115,7 @@ vector 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 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()); }