mirror of
https://github.com/troglobit/finit.git
synced 2026-12-04 21:58:19 +00: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 parent
03a33fc0ee
commit
f949017596
1 file changed
+1
-1
+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);
|
create(file, st.st_mode, st.st_uid, st.st_gid);
|
||||||
} else {
|
} else {
|
||||||
truncate(file, 0);
|
truncate(file, 0);
|
||||||
|
|||||||
Reference in new issue
Block a user