Remove <filesystem> dependency (#400)

This commit is contained in:
TheMatt2 2022-01-21 08:46:19 -08:00 committed by GitHub
parent e248b74ee6
commit ef194f8796
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,7 +5,7 @@
#include <map> #include <map>
#include <string> #include <string>
#include <thread> #include <thread>
#include <filesystem> #include <fstream>
#ifdef _WIN32 #ifdef _WIN32
#include <bcrypt/BCrypt.hpp> #include <bcrypt/BCrypt.hpp>
@ -80,10 +80,12 @@ int main(int argc, char** argv) {
//Check CDClient exists //Check CDClient exists
const std::string cdclient_path = "./res/CDServer.sqlite"; const std::string cdclient_path = "./res/CDServer.sqlite";
if (!std::filesystem::is_regular_file(cdclient_path)) { std::ifstream cdclient_fd(cdclient_path);
Game::logger->Log("WorldServer", "%s does not exist\n", cdclient_path.c_str()); if (!cdclient_fd.good()) {
Game::logger->Log("WorldServer", "%s could not be opened\n", cdclient_path.c_str());
return -1; return -1;
} }
cdclient_fd.close();
//Connect to CDClient //Connect to CDClient
try { try {