fix: Potential crash on Linux when loading external libraries
This commit is contained in:
parent
a1437658af
commit
373db3de95
@ -108,7 +108,7 @@ namespace hex {
|
||||
static bool load(const std::fs::path &pluginFolder);
|
||||
|
||||
static bool loadLibraries();
|
||||
static bool loadLibraries(const std::fs::path &pluginFolder);
|
||||
static bool loadLibraries(const std::fs::path &libraryFolder);
|
||||
|
||||
static void unload();
|
||||
static void reload();
|
||||
|
@ -312,9 +312,9 @@ namespace hex {
|
||||
return success;
|
||||
}
|
||||
|
||||
bool PluginManager::loadLibraries(const std::fs::path& pluginFolder) {
|
||||
bool PluginManager::loadLibraries(const std::fs::path& libraryFolder) {
|
||||
bool success = true;
|
||||
for (const auto &entry : std::fs::recursive_directory_iterator(pluginFolder)) {
|
||||
for (const auto &entry : std::fs::directory_iterator(libraryFolder)) {
|
||||
if (!(entry.path().extension() == ".dll" || entry.path().extension() == ".so" || entry.path().extension() == ".dylib"))
|
||||
continue;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user