summaryrefslogtreecommitdiff
path: root/libpod/events
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-04-21 09:33:01 -0400
committerGitHub <noreply@github.com>2022-04-21 09:33:01 -0400
commitde58f58ee6f76bf6e079fce999d4d0beeb17e797 (patch)
treeddf4173935689e194621955f1aa94d104b653a92 /libpod/events
parent68e998dbff8be86396b91967a0f7edd2c8ea68ee (diff)
parentff2e6291a58785d128a6ff17f49ad45b3bc917ff (diff)
downloadpodman-de58f58ee6f76bf6e079fce999d4d0beeb17e797.tar.gz
podman-de58f58ee6f76bf6e079fce999d4d0beeb17e797.tar.bz2
podman-de58f58ee6f76bf6e079fce999d4d0beeb17e797.zip
Merge pull request #13945 from vrothberg/vendor-common
vendor c/common
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())