FEXServer: Place processed and unprocessed code maps in separate subdirectories

This commit is contained in:
Tony Wasserka committed 2025-12-22 21:20:22 +01:00
1 parent 07f9426879
commit 7eb2ce827c
1 file changed
+3 -1
+3 -1
View File
@@ -668,13 +668,15 @@ void HandleSocketData(fasio::tcp_socket& Socket) {
int Index = 0;
std::string Filename;
do {
Filename = fmt::format("{}/{}.{}.bin", CodeMapDirectory,
Filename = fmt::format("{}/new/{}.{}.bin", CodeMapDirectory,
FEXCore::CodeMap::GetBaseFilename(
FEXCore::ExecutableFileInfo {nullptr, filename_hash, (fextl::string)BinaryPath.string()}, !HasMultiblock),
Index++);
} while (std::filesystem::exists(Filename));
std::filesystem::create_directories(CodeMapDirectory);
std::filesystem::create_directories(CodeMapDirectory + "/new");
std::filesystem::create_directories(CodeMapDirectory + "/ready");
auto CodeMapFD = open(Filename.c_str(), O_CREAT | O_CLOEXEC | O_WRONLY, 0644);
fasio::mutable_buffer Data = {.Data = std::as_writable_bytes(std::span(&Res, 1)),