mirror of
https://github.com/containers/podman.git
synced 2025-05-17 23:26:08 +08:00
set default EventsLogFilePath on first run
The current code only sets EventsLogFilePath when the tmp is overwritten from the db. We should always set the default when no path was set in containers.conf. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
@ -38,7 +38,7 @@ func newLogFileEventer(options EventerOptions) (*EventLogFile, error) {
|
||||
// https://github.com/containers/podman/issues/15688
|
||||
fd, err := os.OpenFile(options.LogFilePath, os.O_RDONLY|os.O_CREATE, 0700)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return nil, fmt.Errorf("failed to create event log file: %w", err)
|
||||
}
|
||||
return &EventLogFile{options: options}, fd.Close()
|
||||
}
|
||||
|
Reference in New Issue
Block a user