comparison lib/lib.c @ 220:104792581cc9 0.0.4

Fix loopfiles to not call function() on file not found.
author Rob Landley <rob@landley.net>
date Tue, 01 Jan 2008 02:39:29 -0600
parents 5697a3f7c8cf
children 163498bf547b
comparison
equal deleted inserted replaced
219:cfa11e043e2b 220:104792581cc9
598 598
599 if (!strcmp(*argv,"-")) fd=0; 599 if (!strcmp(*argv,"-")) fd=0;
600 else if (0>(fd = open(*argv, O_RDONLY))) { 600 else if (0>(fd = open(*argv, O_RDONLY))) {
601 perror_msg("%s",*argv); 601 perror_msg("%s",*argv);
602 toys.exitval = 1; 602 toys.exitval = 1;
603 continue;
603 } 604 }
604 function(fd, *argv); 605 function(fd, *argv);
605 close(fd); 606 close(fd);
606 } while (*++argv); 607 } while (*++argv);
607 } 608 }