mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-12 14:57:13 +00:00
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:
@@ -62,6 +62,17 @@ namespace FdbSnapshot {
|
||||
|
||||
std::optional<Current> ReadCurrent(const std::filesystem::path& dir);
|
||||
|
||||
/**
|
||||
* The files a server opens at startup: the pair the pointer file names, when both are there, or CDServer.sqlite
|
||||
* and no fdb (never the client's own file).
|
||||
*/
|
||||
struct Resolved {
|
||||
std::filesystem::path sqlite;
|
||||
std::filesystem::path fdb; // empty: read CDServer.sqlite only
|
||||
};
|
||||
|
||||
Resolved Resolve(const std::filesystem::path& dir);
|
||||
|
||||
// Writes the pointer file under a temporary name and renames it over the old one (it is never held open)
|
||||
bool WriteCurrent(const std::filesystem::path& dir, const Current& current);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user