feat(cdclient): servers open master's fdb copy, never the client's file

Worlds, the UGC server and the dashboard open the pair named in
resServer/cdclient-current (CDServer.sqlite without an fdb when there is
none). Worlds switch to a new pair on CDCLIENT_RELOAD between frames.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-09-29 23:19:55 -05:00
parent b05b84ff30
commit 1f87b2557d
6 changed files with 70 additions and 6 deletions

View File

@@ -17,6 +17,7 @@
#include "dServer.h"
#include "AssetManager.h"
#include "BinaryPathFinder.h"
#include "FdbSnapshot.h"
#include "ServiceType.h"
#include "MessageType/Master.h"
#include "MasterPackets.h"
@@ -395,7 +396,7 @@ int main(int argc, char** argv) {
// Connect to CDClient database
try {
const std::string cdclientPath = BinaryPathFinder::GetBinaryDir() / "resServer/CDServer.sqlite";
const std::string cdclientPath = FdbSnapshot::Resolve(BinaryPathFinder::GetBinaryDir() / "resServer").sqlite.string();
CDClientDatabase::Connect(cdclientPath);
} catch (std::exception& ex) {
LOG("Failed to connect to CDClient database: %s", ex.what());