possible fix for windows path issue

This commit is contained in:
Lion Kortlepel
2021-09-20 16:59:42 +02:00
parent 238577a4f7
commit d84051bdd3
2 changed files with 6 additions and 1 deletions

View File

@@ -28,8 +28,12 @@ TLuaPlugin::TLuaPlugin(TLuaEngine& Engine, const TLuaPluginConfig& Config, const
});
std::vector<std::pair<fs::path, std::shared_ptr<TLuaResult>>> ResultsToCheck;
for (const auto& Entry : Entries) {
// read in entire file
// read in entire file
#if defined(WIN32)
std::FILE* File = _wfopen(reinterpret_cast<const char*>(Entry.c_str()), "r");
#else
std::FILE* File = std::fopen(reinterpret_cast<const char*>(Entry.c_str()), "r");
#endif
if (File) {
auto Size = std::filesystem::file_size(Entry);
auto Contents = std::make_shared<std::string>();