gio/gtestdbus.c: Fix write_config_file() for Windows
authorChun-wei Fan <fanchunwei@src.gnome.org>
Tue, 18 Mar 2014 04:54:10 +0000 (12:54 +0800)
committerChun-wei Fan <fanchunwei@src.gnome.org>
Mon, 12 May 2014 14:14:05 +0000 (22:14 +0800)
commitc2a828772b30a0c10a8f4b15d7fc841f26b807b8
treeadf7ca46ec3766ba9ef661509e0ade99ed7d3258
parent54d1751fd824ded1f1437572b5c16e2db4154db5
gio/gtestdbus.c: Fix write_config_file() for Windows

Windows does not like g_unlink() to be called on files whose file
descriptor is still open, so doing that would cause a permission
denied error.  Since the fd is not used in that function after
acquiring the temp file, close it earlier before
g_file_set_contents(), so that it can complete successfully.

This fixes a number of GTK+ tests on Windows.

https://bugzilla.gnome.org/show_bug.cgi?id=719344
gio/gtestdbus.c