From: Dominik Kaiser Date: Wed, 15 Jan 2025 15:39:58 +0000 (+0100) Subject: Fix wrong error code X-Git-Url: https://git.dkaiser.de/?a=commitdiff_plain;h=348f46d8ad351f83821831ec997fec91aee43d5c;p=42%2Fminishell.git Fix wrong error code --- diff --git a/src/get_cmd_path.c b/src/get_cmd_path.c index 7c5e103..543540b 100644 --- a/src/get_cmd_path.c +++ b/src/get_cmd_path.c @@ -6,7 +6,7 @@ /* By: chuhlig +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/12/17 19:19:59 by chuhlig #+# #+# */ -/* Updated: 2025/01/15 16:37:18 by dkaiser ### ########.fr */ +/* Updated: 2025/01/15 16:38:39 by dkaiser ### ########.fr */ /* */ /* ************************************************************************** */ @@ -98,7 +98,7 @@ static char *get_simple_cmd_path(char *cmd, int *return_code) if (access(result, F_OK) == -1) { free(result); - return (error(EACCES, cmd, 127, return_code)); + return (error(ENOENT, cmd, 127, return_code)); } else if (access(result, X_OK) == -1) {