aboutsummaryrefslogtreecommitdiff
path: root/libpod/events
diff options
context:
space:
mode:
authorValentin Rothberg <vrothberg@redhat.com>2022-04-21 11:01:48 +0200
committerValentin Rothberg <vrothberg@redhat.com>2022-04-21 13:43:58 +0200
commitff2e6291a58785d128a6ff17f49ad45b3bc917ff (patch)
treee695f63690e1d2f136e85370886039aac2559f2b /libpod/events
parent9c36d8458c1b4d4ab504a7ff54db87489cbb0254 (diff)
downloadpodman-ff2e6291a58785d128a6ff17f49ad45b3bc917ff.tar.gz
podman-ff2e6291a58785d128a6ff17f49ad45b3bc917ff.tar.bz2
podman-ff2e6291a58785d128a6ff17f49ad45b3bc917ff.zip
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 <vrothberg@redhat.com>
Diffstat (limited to 'libpod/events')
-rw-r--r--libpod/events/logfile.go4
1 files changed, 4 insertions, 0 deletions
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())