Skip to content

Commit

Permalink
fix: Remove last remaining getDefaultPaths
Browse files Browse the repository at this point in the history
  • Loading branch information
WerWolv committed Jun 22, 2024
1 parent 24621e6 commit b93fd52
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion main/gui/source/window/linux_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <hex/helpers/utils.hpp>
#include <hex/helpers/utils_linux.hpp>
#include <hex/helpers/logger.hpp>
#include <hex/helpers/default_paths.hpp>

#include <wolv/utils/core.hpp>

Expand Down Expand Up @@ -87,7 +88,7 @@ namespace hex {
log::impl::enableColorPrinting();

// 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))
setenv("LD_LIBRARY_PATH", hex::format("{};{}", hex::getEnvironmentVariable("LD_LIBRARY_PATH").value_or(""), path.string().c_str()).c_str(), true);
}
Expand Down
4 changes: 3 additions & 1 deletion tests/plugins/source/plugins.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
#include <hex/api/plugin_manager.hpp>

#include <hex/helpers/utils.hpp>
#include <hex/helpers/default_paths.hpp>


using namespace hex;
class PluginLoader {
public:
PluginLoader() {
for (const auto &dir : fs::getDefaultPaths(fs::ImHexPath::Plugins)) {
for (const auto &dir : paths::Plugins.read()) {
PluginManager::addLoadPath(dir);
}

Expand Down

0 comments on commit b93fd52

Please sign in to comment.