trashsizecache: Fix look up of directory size cache

For performance reasons, directory sizes are cached in a "directorysizes" file. The file name is written using percent encoding but read back without, which means any directory with a space or special character will effectively not be cached (it won't find it again), significantly impcating performance when trashing files.

CCBUG: 434175


I currently have 1.6 GiB in Trash (14 folders on root level and 629 files). Before, every call to TrashSizeCache::calculateSize took 100 (!) ms. Now it takes 2 ms. It’s still not ideal that we do this for every single file trashed but at least it’s significantly faster now, assuming you have folders with special characters and spaces in trash.

Merge request reports

Loading