From 4b02bfd6eee43aaaa0ad30955cc85558f402d90f Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Wed, 17 Jun 2015 09:25:49 +0100 Subject: [PATCH] gfile: Clarify that g_file_replace_contents() uses atomic renames It uses g_file_replace() internally, so is inherently safe. Though it might vomit .goutputstream-XXXXXX files all over the place occasionally. --- gio/gfile.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gio/gfile.c b/gio/gfile.c index 8925215..0fd62f2 100644 --- a/gio/gfile.c +++ b/gio/gfile.c @@ -7132,7 +7132,9 @@ g_file_load_contents_finish (GFile *file, * or the error %G_IO_ERROR_WRONG_ETAG will be returned. * * If @make_backup is %TRUE, this function will attempt to make a backup - * of @file. + * of @file. Internally, it uses g_file_replace(), so will try to replace the + * file contents in the safest way possible. For example, atomic renames are + * used when replacing local files’ contents. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation -- 2.7.4