glocalfile: Only ignore FS full information for FUSE and ncpfs61a348f28728b0a0c7acbad08410d336b46d1e84163/head
commit61a348f28728b0a0c7acbad08410d336b46d1e84
authorPhilip Withnall <withnall@endlessm.com>
Tue, 10 Jul 2018 13:01:11 +0000 (10 15:01 +0200)
committerPhilip Withnall <withnall@endlessm.com>
Fri, 17 Aug 2018 11:41:20 +0000 (17 12:41 +0100)
treeee0d7fb33dad16befd4594a143e7f75c590b9165
parentd1618c93fac9abec1e442ed4b4ed9b22d1dd3caf
glocalfile: Only ignore FS full information for FUSE and ncpfs

Previously, glocalfile.c would not set file system metadata for
the free/used key for file systems which reported 0 free space. This is
because some file systems don’t set that metadata when you call
statfs(), so we can’t reliably report it. However, some do, and they
can legitimately set f_bavail and f_bfree to 0 if the file system is
full.

In order to avoid that, always set the file system metadata unless the
file system is FUSE or ncpfs.

This is a partial revert of commit 0b9f24c1e1: instead of the changes
made in that commit, I think we should maintain a blacklist of file
systems which are known to not correctly report free space.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://gitlab.gnome.org/GNOME/glib/issues/328
gio/glocalfile.c