From: Markus Armbruster Date: Sun, 2 Sep 2007 11:32:31 +0000 (+0000) Subject: (delete_old_announcements): Delete temporary file when it's not used. X-Git-Tag: v4.3.10~11 X-Git-Url: http://git.pond.sub.org/?p=empserver;a=commitdiff_plain;h=131bb81df8badd0c905f994c07af6675cb212a1e (delete_old_announcements): Delete temporary file when it's not used. --- diff --git a/src/lib/update/anno.c b/src/lib/update/anno.c index ba0f93bfb..0dc630317 100644 --- a/src/lib/update/anno.c +++ b/src/lib/update/anno.c @@ -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); } }