delete old file refine

pull/37/head
YuQing 2019-11-30 16:23:46 +08:00
parent d818e59009
commit 22a6115c4e
1 changed files with 4 additions and 0 deletions

View File

@ -373,6 +373,10 @@ static int log_delete_old_file(LogContext *pContext,
"unlink %s fail, errno: %d, error info: %s\n", \
__LINE__, full_filename, errno, STRERROR(errno));
}
else if (NEED_COMPRESS_LOG(pContext->compress_log_flags))
{
unlink(old_filename);
}
return errno != 0 ? errno : EPERM;
}