mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-17 14:31:30 +00:00
Fix issue where #hotfix doesn't work properly in new Windows installations
This commit is contained in:
parent
a78c3b9800
commit
36e064a7b3
@ -12822,15 +12822,23 @@ void command_hotfix(Client *c, const Seperator *sep)
|
|||||||
c->Message(Chat::White, "Creating and applying hotfix");
|
c->Message(Chat::White, "Creating and applying hotfix");
|
||||||
std::thread t1(
|
std::thread t1(
|
||||||
[c, hotfix_name]() {
|
[c, hotfix_name]() {
|
||||||
|
|
||||||
|
std::string shared_memory_path;
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
shared_memory_path = "shared_memory";
|
||||||
|
if (file_exists("bin/shared_memory")) {
|
||||||
|
shared_memory_path = "bin/shared_memory";
|
||||||
|
}
|
||||||
|
|
||||||
if (hotfix_name.length() > 0) {
|
if (hotfix_name.length() > 0) {
|
||||||
if(system(StringFormat("shared_memory -hotfix=%s", hotfix_name.c_str()).c_str()));
|
if (system(StringFormat("%s -hotfix=%s", shared_memory_path.c_str(), hotfix_name.c_str()).c_str())) {}
|
||||||
} else {
|
}
|
||||||
if(system(StringFormat("shared_memory").c_str()));
|
else {
|
||||||
|
if (system(StringFormat("%s", shared_memory_path.c_str()).c_str())) {}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
shared_memory_path = "./shared_memory";
|
||||||
std::string shared_memory_path = "./shared_memory";
|
|
||||||
if (file_exists("./bin/shared_memory")) {
|
if (file_exists("./bin/shared_memory")) {
|
||||||
shared_memory_path = "./bin/shared_memory";
|
shared_memory_path = "./bin/shared_memory";
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user