fix free space calculation

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


  • 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

Diff Detail

R320 KIO Extras
No Linters Available
No Unit Test Coverage
Build Status
Buildable 22313
Build 22331: arc lint + arc unit
sitter created this revision.Feb 10 2020, 4:26 PM
Restricted Application added projects: Dolphin, Frameworks. · View Herald TranscriptFeb 10 2020, 4:26 PM
Restricted Application added subscribers: kfm-devel, kde-frameworks-devel. · View Herald Transcript
sitter requested review of this revision.Feb 10 2020, 4:26 PM
meven accepted this revision.Feb 11 2020, 8:15 AM
meven added a subscriber: meven.

Tested with success with samba 4.5

I gave a try to fix this issue, did not got through until samba's code. Thanks

This revision is now accepted and ready to land.Feb 11 2020, 8:15 AM
ngraham accepted this revision.Feb 11 2020, 5:50 PM


This revision was automatically updated to reflect the committed changes.