mirror of
https://github.com/troglobit/finit.git
synced 2026-10-02 05:52:48 +07:00
logrotate(): Ignore any error from rename(), file may not exist
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
+1
-1
@@ -98,7 +98,7 @@ static int logrotate(char *file, int num, off_t sz)
|
||||
}
|
||||
}
|
||||
|
||||
rename(file, nfile);
|
||||
(void)rename(file, nfile);
|
||||
create(file, st.st_mode, st.st_uid, st.st_gid);
|
||||
} else {
|
||||
truncate(file, 0);
|
||||
|
||||
Reference in New Issue
Block a user