1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-29 07:37:45 +00:00

fix fs::path::preferred_separator not working with string concat on msvc

This commit is contained in:
NotAdam 2019-01-26 23:17:42 +11:00
parent 648f1c0b0b
commit eb0f0f06dd

View file

@ -58,7 +58,12 @@ GameData::GameData(const std::experimental::filesystem::path& path) try :
{
int maxExLevel = 0;
auto sep = std::experimental::filesystem::path::preferred_separator;
// msvc has retarded stdlib implementation
#ifdef _WIN32
static constexpr auto sep = "\\";
#else
static constexpr auto sep = std::experimental::filesystem::path::preferred_separator;
#endif
// Determine which expansions are available
while( std::experimental::filesystem::exists( std::experimental::filesystem::path( m_path.string() + sep + "ex" + std::to_string( maxExLevel + 1 ) + sep + "ex" + std::to_string( maxExLevel + 1 ) + ".ver" ) ) )