smb: fix free space calculation
Summary:
- collapse statvfs call, there's no purpose in manually opening the file when libsmbc has a convenience wrapper that does exactly what we need with less code on our end
- blockSize is now calculated as per the conditional branches in smbc_stat.c
- free space calculation is now backwards compatible with slightly busted legacy versions of libsmbc not setting f_bavail
FIXED-IN: 19.12.3
BUG: 298801
Test Plan: free space calculation now works with windows10, ubuntu18.04, ubuntu19.10
Reviewers: ngraham, meven
Reviewed By: ngraham, meven
Subscribers: meven, kde-frameworks-devel, kfm-devel
Tags: Dolphin, Frameworks
Differential Revision: https://phabricator.kde.org/D27294