From 45bf927c7417d28496f089cee5545cfd74ff9a0b Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Tue, 14 Jun 2022 03:27:56 +0300 Subject: [PATCH] engine: filesystem: avoid FS_SysFolderExists spam if stat returned ENOTDIR --- engine/common/filesystem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/engine/common/filesystem.c b/engine/common/filesystem.c index 3b036b73..734255e7 100644 --- a/engine/common/filesystem.c +++ b/engine/common/filesystem.c @@ -2536,7 +2536,8 @@ qboolean FS_SysFolderExists( const char *path ) if( stat( path, &buf ) < 0 ) { - Con_Reportf( S_ERROR "FS_SysFolderExists: problem while opening dir: %s\n", strerror( errno )); + if( errno != ENOTDIR ) + Con_Reportf( S_ERROR "FS_SysFolderExists: problem while opening dir: %s\n", strerror( errno )); return false; }