1
0
mirror of https://github.com/element-hq/element-x-android.git synced 2026-10-23 18:49:00 +03:00
Files
Jorge Martin Espinosa 8a5c50d2b8 Fix File.getSizeOfFiles() double counting some files (#7907)
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.
2026-10-14 11:13:14 +02:00
..