core: Replace pack superindex via rename() rather than truncating

This helps allow cloning repositories via "cp -al".
This commit is contained in:
Colin Walters 2012-05-14 10:21:05 -04:00
parent 2fbf864251
commit 102180c5f2

View File

@ -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;