diff options
-rw-r--r-- | libc/bionic/icu.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libc/bionic/icu.cpp b/libc/bionic/icu.cpp index c09c9eac1..7c44f9791 100644 --- a/libc/bionic/icu.cpp +++ b/libc/bionic/icu.cpp @@ -59,6 +59,10 @@ static int __icu_dat_file_filter(const dirent* dirp) { static bool __find_icu() { dirent** namelist = nullptr; int n = scandir("/system/usr/icu", &namelist, &__icu_dat_file_filter, alphasort); + if (n < 0) { + async_safe_write_log(ANDROID_LOG_ERROR, "bionic-icu", "couldn't find ICU folder"); + return false; + } int max_version = -1; while (n--) { // We prefer the latest version available. |