gio: Update GMemoryOutputStream length after truncate

For GMemoryOutputStream, update valid_len when truncating so that
g_memory_output_stream_get_data_size () returns the correct result.

https://bugzilla.gnome.org/show_bug.cgi?id=720080
This commit is contained in:
Ross Lagerwall
2013-12-08 22:41:15 +02:00
committed by Matthias Clasen
parent c34cc2348c
commit 3b9ad6e6ef
2 changed files with 7 additions and 0 deletions

View File

@@ -828,6 +828,8 @@ g_memory_output_stream_truncate (GSeekable *seekable,
if (!array_resize (ostream, offset, FALSE, error))
return FALSE;
ostream->priv->valid_len = offset;
return TRUE;
}