mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-03-09 20:21:10 +00:00
engine: show additional errno string when log file cannot be opened
This commit is contained in:
parent
61643585e0
commit
a6b43fbfff
@ -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…
x
Reference in New Issue
Block a user