From 7543bd2c99c4b76adcead1488f46783713ffa814 Mon Sep 17 00:00:00 2001 From: maix0 Date: Fri, 11 Oct 2024 11:47:45 +0200 Subject: [PATCH] update: should fix not in path --- stdme/src/os/process.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/stdme/src/os/process.c b/stdme/src/os/process.c index 5766d3e1..f4454d67 100644 --- a/stdme/src/os/process.c +++ b/stdme/src/os/process.c @@ -6,7 +6,7 @@ /* By: maiboyer +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/01/03 16:22:41 by maiboyer #+# #+# */ -/* Updated: 2024/09/17 17:12:21 by maiboyer ### ########.fr */ +/* Updated: 2024/10/11 11:47:20 by maiboyer ### ########.fr */ /* */ /* ************************************************************************** */ @@ -62,7 +62,8 @@ t_error in_path(t_spawn_info *info, t_process *process, t_const_str path_raw, { string_clear(s); me_printf_str(s, "%s/%s", path.buffer[idx++], info->binary_path); - if (access(s->buf, X_OK | R_OK) == 0) + printf("testing %s\n", s->buf); + if (access(s->buf, X_OK) == 0) return (vec_str_free(path), NO_ERROR); } return (vec_str_free(path), ERROR); @@ -86,7 +87,7 @@ t_error find_binary(t_spawn_info *info, t_process *process) if (in_path(info, process, info->environement.buffer[p_idx], &s)) return (string_free(s), ERROR); } - if (access(s.buf, X_OK | R_OK) == 0) + if (access(s.buf, X_OK) == 0) { mem_free(info->binary_path); info->binary_path = s.buf;