Keep deleting after first failure.
This commit is contained in:
parent
1a3452d55e
commit
29d980ea1f
5
nuke.c
5
nuke.c
@ -398,6 +398,7 @@ int main(int argc, char *argv[])
|
||||
exit_success:
|
||||
curs_set(1); /* unhide cursor */
|
||||
endwin(); /* Exit ncurses */
|
||||
int exit_status = EXIT_SUCCESS;
|
||||
if (!testing) {
|
||||
for (int i = 0; i < num_files; i++) {
|
||||
int failure;
|
||||
@ -412,11 +413,11 @@ int main(int argc, char *argv[])
|
||||
printf("%s\n", files[i]);
|
||||
} else {
|
||||
printf("Error: unable to delete %s (%s)\n", files[i], strerror(errno));
|
||||
return EXIT_FAILURE;
|
||||
exit_status = EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
}
|
||||
return EXIT_SUCCESS;
|
||||
return exit_status;
|
||||
|
||||
exit_failure:
|
||||
curs_set(1); /* unhide cursor */
|
||||
|
Loading…
Reference in New Issue
Block a user