diff --git a/iped-engine/src/main/java/iped/engine/util/CLibrary.java b/iped-engine/src/main/java/iped/engine/util/CLibrary.java index d8a7cc5039..4255d050b2 100644 --- a/iped-engine/src/main/java/iped/engine/util/CLibrary.java +++ b/iped-engine/src/main/java/iped/engine/util/CLibrary.java @@ -5,7 +5,9 @@ public interface CLibrary extends Library { int _putenv(String value); - + int putenv(String value); + void setenv(String name, String value, boolean overwrite); + } diff --git a/iped-engine/src/main/java/iped/engine/util/Util.java b/iped-engine/src/main/java/iped/engine/util/Util.java index 45aba656f2..b489e11a9a 100644 --- a/iped-engine/src/main/java/iped/engine/util/Util.java +++ b/iped-engine/src/main/java/iped/engine/util/Util.java @@ -485,7 +485,7 @@ public static void setEnvVar(String key, String value) { if (C_Library == null) { C_Library = (CLibrary) Native.loadLibrary("c", CLibrary.class); } - C_Library.putenv(key + "=" + value); + C_Library.setenv(key, value, true); } }