Commit 1cd32a6b authored by kinaba@chromium.org's avatar kinaba@chromium.org

Compute available disk space in Files.app by statvfs.f_bavail, not .f_bfree.

f_bavail is more appropriate because it tells the amount
of disk space that is available to a non-privileged user.
(Writing to Downloads/ indeed stops working if f_bavail=0.)

BUG=268705
TEST=Checked the gear menu value matches with what chrome:drive-internals shows.
R=hidehiko@chromium.org

Review URL: https://codereview.chromium.org/22256004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@215815 0039d316-1c4b-4281-b951-d872f2087c98
parent a7a15f3d
...@@ -136,7 +136,7 @@ void GetSizeStatsOnBlockingPool(const std::string& mount_path, ...@@ -136,7 +136,7 @@ void GetSizeStatsOnBlockingPool(const std::string& mount_path,
*total_size = *total_size =
static_cast<uint64>(stat.f_blocks) * stat.f_frsize; static_cast<uint64>(stat.f_blocks) * stat.f_frsize;
*remaining_size = *remaining_size =
static_cast<uint64>(stat.f_bfree) * stat.f_frsize; static_cast<uint64>(stat.f_bavail) * stat.f_frsize;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment