aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2026-06-22 00:24:12 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2026-06-22 10:13:50 -0400
commite877e9c3180455217c231a50a3c0753ea2a1c5e4 (patch)
tree9a4b8086ac37942b9bf19123184bffd34442cf6c
parent09936f8bb9825ca5f3c4de1cab97f26e2304691e (diff)
downloadstasis-e877e9c3180455217c231a50a3c0753ea2a1c5e4.tar.gz
BUGFIX: env_manipulate_pathstr PM_ONCE logic did opposite of what was intended
* When strstr finds the path in the system path, it's supposed to free the new system path and exit. In this case it was freeing the path when the path wasn't found that lead to several instances of PATH not being updated correctly
-rw-r--r--src/lib/core/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/core/utils.c b/src/lib/core/utils.c
index 152c5c5..4313f2d 100644
--- a/src/lib/core/utils.c
+++ b/src/lib/core/utils.c
@@ -920,7 +920,7 @@ int env_manipulate_pathstr(const char *key, char *path, int mode) {
}
if (mode & PM_ONCE) {
- if (!strstr(system_path_old, path)) {
+ if (strstr(system_path_old, path)) {
guard_free(system_path_new);
return 0;
}