GLocalFile: use GDir for g_file_measure_disk_usage
authorRyan Lortie <desrt@desrt.ca>
Thu, 12 Sep 2013 15:44:11 +0000 (11:44 -0400)
committerRyan Lortie <desrt@desrt.ca>
Mon, 16 Sep 2013 17:38:40 +0000 (13:38 -0400)
commit084e5b0122d52f66d9320fb9b147ca4c62d3e9ac
treed6c2b55f900a9a960ace8fa2960435d3a20803e8
parent725125aba3875ccd86dc51b8e4f301fe3c8de3a4
GLocalFile: use GDir for g_file_measure_disk_usage

It turns out that although dirent is available on mingw32 (where the
code was originally tested), it is not usable from MSVC.

Avoid portability problems by just using GDir.

Also, be careful about ensuring that we utf8-format filenames in our
error messages, and leave out the "file://" component since the strings
we're displaying are not URIs (and we don't want to make them URIs since
the extra escaping would reduce legibility).

Thanks to Chun-wei Fan <fanchunwei@src.gnome.org> for portions of this
patch and for reviews.

https://bugzilla.gnome.org/show_bug.cgi?id=707787
gio/glocalfile.c