From d977f1f988750ea6ae5c5d3635ad024d20dcd1b7 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Sat, 15 Jul 2023 14:50:39 +0200 Subject: [PATCH] impr: Move all .NET scripts to their own subfolder --- .../script_loader/source/loaders/dotnet/dotnet_loader.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/script_loader/source/loaders/dotnet/dotnet_loader.cpp b/plugins/script_loader/source/loaders/dotnet/dotnet_loader.cpp index 886af5877..2c1a2e2bf 100644 --- a/plugins/script_loader/source/loaders/dotnet/dotnet_loader.cpp +++ b/plugins/script_loader/source/loaders/dotnet/dotnet_loader.cpp @@ -198,14 +198,14 @@ namespace hex::script::loader { continue; for (const auto &entry : std::fs::directory_iterator(directoryPath)) { - if (!entry.is_regular_file()) + if (!entry.is_directory()) continue; - const auto &scriptPath = entry.path(); + const auto &scriptPath = entry.path() / "Main.dll"; if (!std::fs::exists(scriptPath)) continue; - this->addScript(scriptPath.stem().string(), [this, scriptPath] { + this->addScript(entry.path().stem().string(), [this, scriptPath] { this->m_loadAssembly(scriptPath); }); }