From 102180c5f25906ad555ab0fa44a718abcda863be Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Mon, 14 May 2012 10:21:05 -0400 Subject: [PATCH] core: Replace pack superindex via rename() rather than truncating This helps allow cloning repositories via "cp -al". --- src/libotutil/ot-variant-utils.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libotutil/ot-variant-utils.c b/src/libotutil/ot-variant-utils.c index b9b85047..513776ef 100644 --- a/src/libotutil/ot-variant-utils.c +++ b/src/libotutil/ot-variant-utils.c @@ -69,7 +69,8 @@ ot_util_variant_save (GFile *dest, ot_lobj GOutputStream *out = NULL; gsize bytes_written; - out = (GOutputStream*)g_file_replace (dest, NULL, 0, FALSE, cancellable, error); + out = (GOutputStream*)g_file_replace (dest, NULL, G_FILE_CREATE_REPLACE_DESTINATION, FALSE, + cancellable, error); if (!out) goto out;