From ff2e6291a58785d128a6ff17f49ad45b3bc917ff Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Thu, 21 Apr 2022 11:01:48 +0200 Subject: vendor c/common Update the recent events-log changes to fix the build error. [NO NEW TESTS NEEDED] since there's no functional change. Signed-off-by: Valentin Rothberg --- libpod/events/logfile.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libpod/events/logfile.go') diff --git a/libpod/events/logfile.go b/libpod/events/logfile.go index 5091f3723..21fdd8027 100644 --- a/libpod/events/logfile.go +++ b/libpod/events/logfile.go @@ -158,6 +158,10 @@ func rotateLog(logfile string, content string, limit uint64) (bool, error) { } file, err := os.Stat(logfile) if err != nil { + if errors.Is(err, os.ErrNotExist) { + // The logfile does not exist yet. + return false, nil + } return false, err } var filesize = uint64(file.Size()) -- cgit v1.2.3-54-g00ecf