-
When calling `g_file_set_contents_full()` without `G_FILE_SET_CONTENTS_CONSISTENT`, the file is written by opening it, `write()`ing to it, then closing it. This is fine as long as the file is not longer than the new content you want to set its contents to. If it is, the last bit of the old content remains, because `g_file_set_contents_full()` was missing an `ftruncate()` call. Fix that, and change the tests to catch truncation failures in future. Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Fixes: #3144 (Backport 2.78: Unmark new translatable string as translatable, to avoid adding need for translations.)
addda9e7