Commit a69ffcdd authored by Jean-Paul Saman's avatar Jean-Paul Saman

examples/dvbinfo/dvbinfo.c: Handle rename errors (CID 17233)

parent 085d158d
......@@ -398,7 +398,13 @@ static int dvbinfo_process(dvbinfo_capture_t *capture)
fflush(fd);
fclose(fd);
unlink(param->summary.file);
rename(psz_temp, param->summary.file);
int ret = rename(psz_temp, param->summary.file);
if (ret < 0)
{
libdvbpsi_log(param, DVBINFO_LOG_ERROR,
"failed renming summary file (disabling summary logging)\n");
param->b_summary = false;
}
}
else
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment