Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- src/util/virrotatingfile.c.orig 2017-12-14 03:20:10.231829923 +0530
- +++ src/util/virrotatingfile.c 2017-12-14 03:23:53.570669831 +0530
- @@ -185,9 +185,15 @@
- virRotatingFileWriterDelete(virRotatingFileWriterPtr file)
- {
- size_t i;
- + char *bname = NULL;
- if (unlink(file->basepath) < 0 &&
- errno != ENOENT && errno != EBUSY) {
- + bname = basename(file->basepath);
- +
- + if (!strcmp(bname, "console.log"))
- + return 0;
- +
- virReportSystemError(errno,
- _("Unable to delete file %s"),
- file->basepath);
- @@ -201,6 +207,13 @@
- if (unlink(oldpath) < 0 &&
- errno != ENOENT && errno != EBUSY) {
- + bname = basename(file->basepath);
- +
- + if (!strcmp(bname, "console.log")) {
- + VIR_FREE(oldpath);
- + return 0;
- + }
- +
- virReportSystemError(errno,
- _("Unable to delete file %s"),
- oldpath);
Advertisement
Add Comment
Please, Sign In to add comment