(delete_old_announcements): Delete temporary file when it's not used.

This commit is contained in:
Markus Armbruster 2007-09-02 11:32:31 +00:00
parent 8d22c027f7
commit 131bb81df8

View file

@ -99,6 +99,9 @@ delete_old_announcements(void)
if (rename(tmp_filename, annfil) != 0)
logerror("can't move temporary telegram file %s "
"to telegram file %s", tmp_filename, annfil);
} else {
if (remove(tmp_filename) < 0)
logerror("can't delete telegram file %s", tmp_filename);
}
}