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:
|
exit_success:
|
||||||
curs_set(1); /* unhide cursor */
|
curs_set(1); /* unhide cursor */
|
||||||
endwin(); /* Exit ncurses */
|
endwin(); /* Exit ncurses */
|
||||||
|
int exit_status = EXIT_SUCCESS;
|
||||||
if (!testing) {
|
if (!testing) {
|
||||||
for (int i = 0; i < num_files; i++) {
|
for (int i = 0; i < num_files; i++) {
|
||||||
int failure;
|
int failure;
|
||||||
@ -412,11 +413,11 @@ int main(int argc, char *argv[])
|
|||||||
printf("%s\n", files[i]);
|
printf("%s\n", files[i]);
|
||||||
} else {
|
} else {
|
||||||
printf("Error: unable to delete %s (%s)\n", files[i], strerror(errno));
|
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:
|
exit_failure:
|
||||||
curs_set(1); /* unhide cursor */
|
curs_set(1); /* unhide cursor */
|
||||||
|
Loading…
Reference in New Issue
Block a user