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:
parent
648f1c0b0b
commit
eb0f0f06dd
1 changed files with 6 additions and 1 deletions
7
deps/datReader/GameData.cpp
vendored
7
deps/datReader/GameData.cpp
vendored
|
@ -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" ) ) )
|
||||
|
|
Loading…
Add table
Reference in a new issue