Skip IsRegularFileOrPipe() check on Emscripten

The sandbox guarantees that this will be true.

Fixes https://github.com/libsdl-org/SDL/issues/12108

(backported from from commit 1c7cc60286)
This commit is contained in:
Sam Lantinga authored and Ozkan Sezer committed 2025-01-28 10:47:10 +03:00
1 parent d3a4d62fc2
commit 0efe8892d6
1 file changed
+1 -1
+1 -1
View File
@@ -537,7 +537,7 @@ static SDL_bool IsRegularFileOrPipe(FILE *f)
!((st.st_mode & _S_IFMT) == _S_IFREG || (st.st_mode & _S_IFMT) == _S_IFIFO)) {
return SDL_FALSE;
}
#else
#elif !defined __EMSCRIPTEN__
struct stat st;
if (fstat(fileno(f), &st) < 0 || !(S_ISREG(st.st_mode) || S_ISFIFO(st.st_mode))) {
return SDL_FALSE;