g_file_replace should not fail to replace a readonly file when passed G_FILE_CREATE_REPLACE_DESTINATION
Submitted by Nelson Benítez León
Currently g_file_replace() fails when the file being replaced is readonly (eg. 0444 mode), this should not happen when the flag G_FILE_CREATE_REPLACE_DESTINATION is passed, as docs for that flag says:
"Replace the destination as if it didn't exist before. Don't try to keep any old permissions, replace instead of following links. This is generally useful if you're doing a "copy over" rather than a "save new version of" replace operation. You can think of it as "unlink destination" before writing to it, although the implementation may not be exactly like that. Since 2.20"
This is bug is blocking gedit/gtksourceview bug 644358 .
I will be attaching a patch for this issue.