(delete_old_announcements): Delete temporary file when it's not used.
This commit is contained in:
parent
8d22c027f7
commit
131bb81df8
1 changed files with 3 additions and 0 deletions
|
@ -99,6 +99,9 @@ delete_old_announcements(void)
|
||||||
if (rename(tmp_filename, annfil) != 0)
|
if (rename(tmp_filename, annfil) != 0)
|
||||||
logerror("can't move temporary telegram file %s "
|
logerror("can't move temporary telegram file %s "
|
||||||
"to telegram file %s", tmp_filename, annfil);
|
"to telegram file %s", tmp_filename, annfil);
|
||||||
|
} else {
|
||||||
|
if (remove(tmp_filename) < 0)
|
||||||
|
logerror("can't delete telegram file %s", tmp_filename);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue