smb: fix free space calculation

Authored by sitter on Feb 10 2020, 4:18 PM.

Description

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

Details

Committed
sitterFeb 13 2020, 11:17 AM
Reviewer
ngraham
Differential Revision
D27294: fix free space calculation
Parents
R320:e2eadb7555a6: smb: support more advanced hidden file flag
Branches
Unknown
Tags
Unknown