-
We need to close the stream *before* applying the file modes, because g_file_replace() allocates a temporary file. At the moment we're applying the modes to the extant file, then immediately rename()ing over it with the default perms. This regressed with commit 166766a8. The real fix here is to have g_file_create_with_info() so that we can atomically create a file with the permissions we want. https://bugzilla.gnome.org/show_bug.cgi?id=696014
978571d8