It doesn't make sense to keep a file around if it's not even a proper
backup.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
}
if ((c != EOF) || (ferror (fp) != 0) || (fflush (bkfp) != 0)) {
(void) fclose (bkfp);
- /* FIXME: unlink the backup file? */
+ unlink(backup);
return -1;
}
if (fsync (fileno (bkfp)) != 0) {
(void) fclose (bkfp);
- /* FIXME: unlink the backup file? */
+ unlink(backup);
return -1;
}
if (fclose (bkfp) != 0) {
- /* FIXME: unlink the backup file? */
+ unlink(backup);
return -1;
}