glocalfileinfo: Stop using PATH_MAX for .hidden
authorRyan Lortie <desrt@desrt.ca>
Tue, 12 Mar 2013 16:53:42 +0000 (12:53 -0400)
committerRyan Lortie <desrt@desrt.ca>
Wed, 13 Mar 2013 13:41:03 +0000 (09:41 -0400)
commit3902006a5b043ad418ff5ee1542d54c678280db8
tree1325bc76fe52d0ae841d77c1f99c1e2efca1a1b1
parent8028f54c9c66b7e483ff658e082062ad5275f264
glocalfileinfo: Stop using PATH_MAX for .hidden

We were using PATH_MAX to size a static array for reading lines from
the .hidden file.  Some platforms (Hurd) don't declare a PATH_MAX.

Switch to using g_file_get_contents() and g_str_split('\n') instead.

Also take the time to clean up a bit with a switch to using a 'set mode'
GHashTable (since this code was originally written before we had those).

This patch is largely based on a patch from Emilio Pozuelo Monfort (who
also reported the bug).

https://bugzilla.gnome.org/show_bug.cgi?id=695147
gio/glocalfileinfo.c