mirror of
https://github.com/SantaSpeen/BeamMP-Server.git
synced 2025-08-18 12:45:36 +00:00
HotSwap linux fix
This commit is contained in:
parent
2a0939891b
commit
92c44b19c5
@ -57,12 +57,12 @@ void FolderList(const std::string& Path, bool HotSwap) {
|
|||||||
if (stat(Script->GetFileName().c_str(), &Info) != 0) {
|
if (stat(Script->GetFileName().c_str(), &Info) != 0) {
|
||||||
Script->SetStopThread(true);
|
Script->SetStopThread(true);
|
||||||
PluginEngine.erase(Script);
|
PluginEngine.erase(Script);
|
||||||
info(Sec("[HOTSWAP] Removed : ") + Script->GetFileName().substr(Script->GetFileName().find('\\')));
|
info(Sec("[HOTSWAP] Removed removed script due to delete"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (Script->GetLastWrite() != fs::last_write_time(Script->GetFileName())) {
|
if (Script->GetLastWrite() != fs::last_write_time(Script->GetFileName())) {
|
||||||
Script->SetStopThread(true);
|
Script->SetStopThread(true);
|
||||||
info(Sec("[HOTSWAP] Updated : ") + Script->GetFileName().substr(Script->GetFileName().find('\\')));
|
info(Sec("[HOTSWAP] Updated Scripts due to edit"));
|
||||||
Script->SetLastWrite(fs::last_write_time(Script->GetFileName()));
|
Script->SetLastWrite(fs::last_write_time(Script->GetFileName()));
|
||||||
Script->Reload();
|
Script->Reload();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user