mirror of
https://github.com/SantaSpeen/BeamMP-Server.git
synced 2026-04-03 21:16:01 +00:00
implement GetOSName, start working on HttpsPOST
This commit is contained in:
@@ -70,12 +70,17 @@ void TLuaEngine::FolderList(const std::string& Path, bool HotSwap) {
|
||||
for (const auto& entry : fs::directory_iterator(Path)) {
|
||||
if (fs::is_directory(entry)) {
|
||||
RegisterFiles(entry.path(), HotSwap);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void TLuaEngine::RegisterFiles(const fs::path& Path, bool HotSwap) {
|
||||
std::string Name = Path.filename().string();
|
||||
std::string Name = Path.substr(Path.find_last_of('/') + 1);
|
||||
#else
|
||||
|
||||
#endif
|
||||
if (!HotSwap)
|
||||
info(("Loading plugin : ") + Name);
|
||||
std::vector<fs::path> Entries;
|
||||
@@ -104,10 +109,11 @@ void TLuaEngine::RegisterFiles(const fs::path& Path, bool HotSwap) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool TLuaEngine::IsNewFile(const std::string& Path) {
|
||||
for (auto& Script : mLuaFiles) {
|
||||
if (fs::absolute(Path) == fs::absolute(Script->GetFileName()))
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user