I found that G_FILE_CREATE_REPLACE_DESTINATION wasn't actually deleting the contents of the file for some reason. So I suspected the flag could mean something else.

However, that's worth double checking - I'll check now.