Commits

Steven! Ragnarök committed d8ea417

IO Redirection up and running.

Comments (0)

Files changed (1)

src/interpreter.c

 	if (!cmdpid)  {
 		if (redirect_list != NULL) {
 			redirect = redirect_list->children;
+
 			while (redirect != NULL) {
-				switch(redirect->node->children->node->type) {
+				switch(redirect->node->type) {
 					case STDIN_REDIRECT:
 						stinf = fopen(
 								interpret_arg(redirect_list->children->node->children->node),"r");
 								interpret_arg(redirect_list->children->node->children->node), "w");
 						break;
 				}
+				redirect = redirect->next;
 			}
 		}