mirror of
https://github.com/SantaSpeen/BeamMP-Server.git
synced 2025-08-18 10: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) {
|
||||
Script->SetStopThread(true);
|
||||
PluginEngine.erase(Script);
|
||||
info(Sec("[HOTSWAP] Removed : ") + Script->GetFileName().substr(Script->GetFileName().find('\\')));
|
||||
info(Sec("[HOTSWAP] Removed removed script due to delete"));
|
||||
break;
|
||||
}
|
||||
if (Script->GetLastWrite() != fs::last_write_time(Script->GetFileName())) {
|
||||
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->Reload();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user