summaryrefslogtreecommitdiffstats
path: root/src/e_externs_pipes.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/e_externs_pipes.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/e_externs_pipes.c b/src/e_externs_pipes.c
index 858e60f..8556cbb 100644
--- a/src/e_externs_pipes.c
+++ b/src/e_externs_pipes.c
@@ -174,6 +174,9 @@ void
rptr = rptr->next;
}
i = 0;
- exec_path((const char**)fullpath, head, msh);
+ while (fullpath[i] != NULL)
+ i++;
+ if (i == (pipes + 1))
+ exec_path((const char**)fullpath, head, msh);
ft_delwords(fullpath);
}