Fix race condition when calculating disk usage
This merge request, when approved, will close issue/bug:
#520 (closed)