implement GetOSName, start working on HttpsPOST

This commit is contained in:
Lion Kortlepel
2021-06-25 00:42:45 +02:00
parent b1caf5c29a
commit 80432eb718
6 changed files with 125 additions and 33 deletions

View File

@@ -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;
}
}