os: Failure to remove a non-existent log file is not an error

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
This commit is contained in:
Adam Jackson 2016-01-06 10:03:23 -05:00
parent 862cbf4c87
commit 6dcb73375e
1 changed files with 1 additions and 1 deletions

View File

@ -218,7 +218,7 @@ LogFilePrep(const char *fname, const char *backup, const char *idstring)
}
}
else {
if (remove(logFileName) != 0) {
if (remove(logFileName) != 0 && errno != ENOENT) {
FatalError("Cannot remove old log file \"%s\": %s\n",
logFileName, strerror(errno));
}