1
0
mirror of synced 2024-11-12 02:00:52 +01:00

fix: Remove last remaining getDefaultPaths

This commit is contained in:
WerWolv 2024-06-22 12:57:09 +02:00
parent 24621e6612
commit b93fd523aa
2 changed files with 5 additions and 2 deletions

View File

@ -9,6 +9,7 @@
#include <hex/helpers/utils.hpp> #include <hex/helpers/utils.hpp>
#include <hex/helpers/utils_linux.hpp> #include <hex/helpers/utils_linux.hpp>
#include <hex/helpers/logger.hpp> #include <hex/helpers/logger.hpp>
#include <hex/helpers/default_paths.hpp>
#include <wolv/utils/core.hpp> #include <wolv/utils/core.hpp>
@ -87,7 +88,7 @@ namespace hex {
log::impl::enableColorPrinting(); log::impl::enableColorPrinting();
// Add plugin library folders to dll search path // Add plugin library folders to dll search path
for (const auto &path : hex::fs::getDefaultPaths(fs::ImHexPath::Libraries)) { for (const auto &path : paths::Libraries.read()) {
if (std::fs::exists(path)) if (std::fs::exists(path))
setenv("LD_LIBRARY_PATH", hex::format("{};{}", hex::getEnvironmentVariable("LD_LIBRARY_PATH").value_or(""), path.string().c_str()).c_str(), true); setenv("LD_LIBRARY_PATH", hex::format("{};{}", hex::getEnvironmentVariable("LD_LIBRARY_PATH").value_or(""), path.string().c_str()).c_str(), true);
} }

View File

@ -1,12 +1,14 @@
#include <hex/api/plugin_manager.hpp> #include <hex/api/plugin_manager.hpp>
#include <hex/helpers/utils.hpp> #include <hex/helpers/utils.hpp>
#include <hex/helpers/default_paths.hpp>
using namespace hex; using namespace hex;
class PluginLoader { class PluginLoader {
public: public:
PluginLoader() { PluginLoader() {
for (const auto &dir : fs::getDefaultPaths(fs::ImHexPath::Plugins)) { for (const auto &dir : paths::Plugins.read()) {
PluginManager::addLoadPath(dir); PluginManager::addLoadPath(dir);
} }