From a78e5244815b432cf80352b9cc915a967601354d Mon Sep 17 00:00:00 2001 From: David Markowitz Date: Tue, 17 Dec 2024 16:46:21 -0800 Subject: [PATCH] create resServer if not exist --- dMasterServer/MasterServer.cpp | 1 + dServer/Server.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/dMasterServer/MasterServer.cpp b/dMasterServer/MasterServer.cpp index e01ca255b..b764169a4 100644 --- a/dMasterServer/MasterServer.cpp +++ b/dMasterServer/MasterServer.cpp @@ -126,6 +126,7 @@ int main(int argc, char** argv) { MigrationRunner::RunMigrations(); const auto resServerPath = BinaryPathFinder::GetBinaryDir() / "resServer"; + std::filesystem::create_directories(resServerPath); const bool cdServerExists = std::filesystem::exists(resServerPath / "CDServer.sqlite"); const bool oldCDServerExists = std::filesystem::exists(Game::assetManager->GetResPath() / "CDServer.sqlite"); const bool fdbExists = std::filesystem::exists(Game::assetManager->GetResPath() / "cdclient.fdb"); diff --git a/dServer/Server.cpp b/dServer/Server.cpp index cd801a3b3..3b9ba2bb3 100644 --- a/dServer/Server.cpp +++ b/dServer/Server.cpp @@ -13,7 +13,7 @@ void Server::SetupLogger(const std::string_view serviceName) { const auto logsDir = BinaryPathFinder::GetBinaryDir() / "logs"; - if (!std::filesystem::exists(logsDir)) std::filesystem::create_directory(logsDir); + if (!std::filesystem::exists(logsDir)) std::filesystem::create_directories(logsDir); std::string logPath = (logsDir / serviceName).string() + "_" + std::to_string(time(nullptr)) + ".log"; bool logToConsole = false;