Recently we received a weird bug report from a user of Slideshow app. They set up files, content, playlist and schedules in Slideshow, all correctly, but somehow the app wasn’t displaying the files they uploaded. The files were visible in Slideshow’s File manager, but not on the device’s screen. After a quick back and forth, we established that for some reason, Slideshow doesn’t scan files that are in a folder containing an upper-case letter in its folder name.
Baffled by this discovery, I tested the same configuration on other devices as well, all of which worked correctly. The problem was occurring just on a single device which was used by the customer: Lenovo ThinkCentre computer running PrimeOS (https://www.primeos.in/) clone of Android.
We quickly established that File manager shows all the files and folders correctly, exactly as they were on the local file system. However, when Slideshow was scanning the folder for its content “Files randomly”, it didn’t find any files. I was looking through the source code for a couple of minutes and then it suddenly clicked. PrimeOS is using EXT4 file system by default, which is case-sensitive, but most Android devices are using either F2FS, FAT32 or SDCardFS file system for data, all of which are case-insensitive. Even the official Android documentation states that “Android supports devices with traditional storage, which is defined to be a case-insensitive filesystem”.
Case sensitivity means that the file system distinguishes between lowercase and uppercase letters. In most Android devices, when you search for folders called
IMAGES, you get the same folder in both cases (= case-insensitive). However, on PrimeOS,
IMAGES can be two different folders and searching for
images won’t find
IMAGES (= case-sensitive). After realizing that the problem was caused by incorrect handling of folder names on case-sensitive file systems, we quickly prepared a fix, tested it on various devices in all imaginable configurations and released it as a part of Slideshow 4.4.7.
The lesson learned from this bug is that even if something works on all available devices for years, there still might be a device that does something differently (not incorrectly, per se) and it is necessary to fix this corner case as well.
We will write more about our subsequent testing of PrimeOS in the future.