Gio: g_file_replace doesn't respect the "replace-destination" flag

Hi,

I observed some strange behavior when using the GFile.replace() API, either directly or indirectly when saving with any GtkSourceView-based editor (source):
The saved file loses its original creation date (ends up with the same as the modified date), indicating that the file was re-created, despite the replace-destination flag and the make_backup parameter both not being set.

Looking on Gio side, I see that a temporary file is actually used for writing, even if replace-destination is not set, as long as the file is not a symlink and has no multiple hard-links (source), which is the most common case.

Is it expected?

There is a comment about backup strategies, shouldn’t the 2nd strategy be used if replace-destination is not set, to avoid losing the original file stats?

If the current strategy is expected, would it make sense to carry over the creation time to the temporary file? Only the owner and permissions are attempted to be copied. BTW it seems xattrs are lost too.