Browse Source

filesystem: report an error when opening file was unsuccessful, with the exception for non-existent files

pull/2/head
Alibek Omarov 1 year ago
parent
commit
c926fee13c
  1. 3
      filesystem/filesystem.c

3
filesystem/filesystem.c

@ -1677,6 +1677,9 @@ file_t *FS_SysOpen( const char *filepath, const char *mode ) @@ -1677,6 +1677,9 @@ file_t *FS_SysOpen( const char *filepath, const char *mode )
if( file->handle < 0 )
{
if( errno != ENOENT )
Con_Printf( S_ERROR "%s: can't open file %s: %s\n", __func__, filepath, strerror( errno ));
Mem_Free( file );
return NULL;
}

Loading…
Cancel
Save