Skip to content
Snippets Groups Projects
Commit 1f502cb4 authored by Ryan Gonzalez's avatar Ryan Gonzalez
Browse files

logger: Fix always re-opening files when --log-fd is used


`self->file_stat` was only initialized if an fd was *not* given, which
would lead it to always re-create the log file once.

steamrt/tasks#487

Signed-off-by: default avatarRyan Gonzalez <ryan.gonzalez@collabora.com>
parent e8fe550f
No related branches found
No related tags found
1 merge request!743logger: Fix always re-opening files when --log-fd is used
This commit is part of merge request !743. Comments created here will be created in the context of that merge request.
......@@ -450,6 +450,10 @@ _srt_logger_setup (SrtLogger *self,
if (self->filename == NULL)
return glnx_throw (error,
"Providing a log fd requires a filename");
if (fstat (self->file_fd, &self->file_stat) < 0)
return glnx_throw_errno_prefix (error,
"Unable to stat \"%s\"",
self->filename);
}
else if (self->use_file)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment