From 15a70c7aa9e3cb3c1b0ec7cc4cb89c2a0c6e572c Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sat, 4 Jul 2020 02:24:53 -0500 Subject: [PATCH] Fix for windows hotfix [skip ci] --- zone/command.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/zone/command.cpp b/zone/command.cpp index 58cf8e876..f60490b88 100755 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -12828,15 +12828,19 @@ void command_hotfix(Client *c, const Seperator *sep) #ifdef WIN32 shared_memory_path = "shared_memory"; if (file_exists("bin/shared_memory.exe")) { - shared_memory_path = "bin/shared_memory"; + shared_memory_path = "bin\\shared_memory.exe"; } + std::string hotfix_command; if (hotfix_name.length() > 0) { - if (system(StringFormat("\"%s\" -hotfix=%s", shared_memory_path.c_str(), hotfix_name.c_str()).c_str())) {} + hotfix_command = fmt::format("\"{}\" -hotfix={}", shared_memory_path, hotfix_name); } else { - if (system(StringFormat("\"%s\"", shared_memory_path.c_str()).c_str())) {} + hotfix_command = fmt::format("\"{}\"", shared_memory_path, hotfix_name); } + + LogInfo("Running hotfix command [{}]", hotfix_command); + if (system(hotfix_command.c_str())) {} #else shared_memory_path = "./shared_memory"; if (file_exists("./bin/shared_memory")) {