diff options
| author | Joseph Hunkeler <jhunkeler@gmail.com> | 2026-06-22 00:24:12 -0400 |
|---|---|---|
| committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2026-06-22 10:13:50 -0400 |
| commit | e877e9c3180455217c231a50a3c0753ea2a1c5e4 (patch) | |
| tree | 9a4b8086ac37942b9bf19123184bffd34442cf6c | |
| parent | 09936f8bb9825ca5f3c4de1cab97f26e2304691e (diff) | |
| download | stasis-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.c | 2 |
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; } |
