From c926fee13c08bccfc5269dfbf8f8c64d391e007f Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Mon, 11 Dec 2023 07:10:45 +0300 Subject: [PATCH] filesystem: report an error when opening file was unsuccessful, with the exception for non-existent files --- filesystem/filesystem.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/filesystem/filesystem.c b/filesystem/filesystem.c index 0775c72c..8d46baa2 100644 --- a/filesystem/filesystem.c +++ b/filesystem/filesystem.c @@ -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; }