[easytag] Check for failure of g_output_stream_write_all()



commit dd4f3bd815bd186e3e58752e0ac7999c6c645fd7
Author: David King <amigadave amigadave com>
Date:   Sun Jan 19 09:26:57 2014 +0000

    Check for failure of g_output_stream_write_all()
    
    Flip an incorrect check for the return value of
    g_output_stream_write_all() when svaing Vorbis tags. Fixes bug 722522.

 src/vcedit.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/vcedit.c b/src/vcedit.c
index 12e7b00..bf083d9 100644
--- a/src/vcedit.c
+++ b/src/vcedit.c
@@ -566,9 +566,9 @@ vcedit_write(vcedit_state *state, GFile *file, GError **error)
                 goto cleanup;
             }
 
-            if (g_output_stream_write_all (G_OUTPUT_STREAM (ostream),
-                                           ogout.body, ogout.body_len,
-                                           &bytes_written, NULL, error))
+            if (!g_output_stream_write_all (G_OUTPUT_STREAM (ostream),
+                                            ogout.body, ogout.body_len,
+                                            &bytes_written, NULL, error))
             {
                 g_debug ("Only %" G_GSIZE_FORMAT " bytes out of %ld bytes of "
                          "data were written", bytes_written, ogout.body_len);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]