From 35dc072b26de5b6c72c7d18c010cdfd6c5a90162 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Mon, 13 Jan 2025 13:56:15 +0300 Subject: [PATCH] filesystem: on Android, assume all paths are case-sensitive because doing Linux-specific ioctl check crashes FUSE driver and kills our app --- filesystem/dir.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/filesystem/dir.c b/filesystem/dir.c index 622caf54..cd012c8a 100644 --- a/filesystem/dir.c +++ b/filesystem/dir.c @@ -57,6 +57,12 @@ static qboolean Platform_GetDirectoryCaseSensitivity( const char *dir ) { #if XASH_WIN32 || XASH_PSVITA || XASH_NSWITCH return false; +#elif XASH_ANDROID + // on Android, doing code below causes crash in MediaProviderGoogle.apk!libfuse_jni.so + // which in turn makes vold (Android's Volume Daemon) to umount /storage/emulated/0 + // and because you can't unmount a filesystem when there is file descriptors open + // it has no other choice but to terminate and then kill our program + return true; #elif XASH_LINUX && defined( FS_IOC_GETFLAGS ) int flags = 0; int fd;