From 75156fd3ee8848ea692d70625306c5d36d87aa0c Mon Sep 17 00:00:00 2001 From: joris schaft Date: Fri, 7 Jun 2024 11:51:08 +0200 Subject: [PATCH] [ADD] execute './' --- src/path.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/path.c b/src/path.c index 78f0660..e24978e 100644 --- a/src/path.c +++ b/src/path.c @@ -6,7 +6,7 @@ /* By: jschaft +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/11/16 12:07:26 by jschaft #+# #+# */ -/* Updated: 2024/05/01 17:53:38 by mcolonna ### ########.fr */ +/* Updated: 2024/06/07 11:40:04 by jschaft ### ########.fr */ /* */ /* ************************************************************************** */ @@ -34,6 +34,11 @@ const char *search_path( const char *r; i = 0; + if (access(prog, X_OK) >= 0) + { + mem_free((void *)prog2); + return (ft_strdup(prog)); + } while (path[i] != NULL) { r = str_join(fatal_error, mc, path[i], prog2);