mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-28 07:47:03 -05:00
sys: putenv sucks. Use setenv instead
This commit is contained in:
@@ -21,7 +21,7 @@ namespace hex {
|
||||
// Add plugin library folders to dll search path
|
||||
for (const auto &path : hex::fs::getDefaultPaths(fs::ImHexPath::Libraries)) {
|
||||
if (std::fs::exists(path))
|
||||
putenv(hex::format("LD_LIBRARY_PATH={}", path.c_str()).c_str());
|
||||
setenv("LD_LIBRARY_PATH", hex::format("{};{}", hex::getEnvironmentVariable("LD_LIBRARY_PATH").value_or(""), path.string().c_str()).c_str(), true);
|
||||
}
|
||||
|
||||
if (!isatty(STDOUT_FILENO)) {
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace hex {
|
||||
// Add plugin library folders to dll search path
|
||||
for (const auto &path : hex::fs::getDefaultPaths(fs::ImHexPath::Libraries)) {
|
||||
if (std::fs::exists(path))
|
||||
putenv(hex::format("LD_LIBRARY_PATH={}", path.c_str()).c_str());
|
||||
setenv("LD_LIBRARY_PATH", hex::format("{};{}", hex::getEnvironmentVariable("LD_LIBRARY_PATH").value_or(""), path.string().c_str()).c_str(), true);
|
||||
}
|
||||
|
||||
if (!isatty(STDOUT_FILENO)) {
|
||||
|
||||
Reference in New Issue
Block a user