GNOME Bugzilla – Bug 729981
gio/gtestdbus.c: Fix write_config_file() for Windows
Last modified: 2014-05-12 14:18:31 UTC
Hi, In write_config_file(), we are calling g_file_set_contents() to write items into a temp file. As g_file_set_contents() call on g_unlink(), we would get a permission denied error on Windows as it locks that temp file unless the file descriptor (fd) that was associated with the temp file during its creation is closed beforehand.
Created attachment 276354 [details] [review] gio/gtestdbus.c: Close fd in write_config_file() before calling g_file_set_contents() Hi, As the fd that was acquired during the creation of the temp file in write_config_file() is not used directly after its creation, call close() on the fd earlier, before we call g_file_set_contents(). This would fix a number of GTK+ tests on Windows, as a result. This is my patch to attempt to fix this issue. With blessings, thank you!
Review of attachment 276354 [details] [review]: Looks good.
Review of attachment 276354 [details] [review]: Hello Colin, Thanks for the review. The patch was pushed as: master: c2a82877 glib-2-40: 321b827d With blessings, thank you!