1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-01-30 19:03:04 +00:00

fix: do not write log if file handler is bad (#5675)

This commit is contained in:
Geoffrey Bonneville 2023-06-27 11:44:10 -07:00 committed by GitHub
parent 2db2091599
commit 7fdfabe184
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -164,6 +164,11 @@ void logAddImpl(
if (fp == TR_BAD_SYS_FILE)
{
fp = tr_sys_file_get_std(TR_STD_SYS_FILE_ERR);
// if fp is still bad, do not write log
if (fp == TR_BAD_SYS_FILE)
{
return;
}
}
auto timestr = std::array<char, 64>{};