mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-10-31 08:15:02 +00:00
8a5c50d2b8
The `File.length()` docs state: > Returns the length of the file denoted by this abstract pathname. The return value is unspecified if this pathname denotes a directory. On Android, it *seems* to currently have the right behaviour, summing up the size of its children, which made `File.getSizeOfFiles()` double-count the size of some directories. To avoid this, and be able to control the actual behaviour no matter what future Android versions do, let's count those ourselves.