engine: show additional errno string when log file cannot be opened

This commit is contained in:
Alibek Omarov 2022-01-29 03:04:54 +03:00
parent 61643585e0
commit a6b43fbfff

View File

@ -17,6 +17,8 @@ GNU General Public License for more details.
#if XASH_ANDROID
#include <android/log.h>
#endif
#include <string.h>
#include <errno.h>
#if !XASH_WIN32 && !XASH_MOBILE_PLATFORM
#define XASH_COLORIZE_CONSOLE
@ -115,7 +117,7 @@ void Sys_InitLog( void )
s_ld.logfile = fopen( s_ld.log_path, mode );
if( !s_ld.logfile )
{
Con_Reportf( S_ERROR "Sys_InitLog: can't create log file %s\n", s_ld.log_path );
Con_Reportf( S_ERROR "Sys_InitLog: can't create log file %s: %s\n", s_ld.log_path, strerror( errno ) );
}
else
{