Browse Source

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

pull/2/head
Alibek Omarov 3 years ago
parent
commit
a6b43fbfff
  1. 4
      engine/common/sys_con.c

4
engine/common/sys_con.c

@ -17,6 +17,8 @@ GNU General Public License for more details.
#if XASH_ANDROID #if XASH_ANDROID
#include <android/log.h> #include <android/log.h>
#endif #endif
#include <string.h>
#include <errno.h>
#if !XASH_WIN32 && !XASH_MOBILE_PLATFORM #if !XASH_WIN32 && !XASH_MOBILE_PLATFORM
#define XASH_COLORIZE_CONSOLE #define XASH_COLORIZE_CONSOLE
@ -115,7 +117,7 @@ void Sys_InitLog( void )
s_ld.logfile = fopen( s_ld.log_path, mode ); s_ld.logfile = fopen( s_ld.log_path, mode );
if( !s_ld.logfile ) 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 else
{ {

Loading…
Cancel
Save