[gnome-autoar] AutoarCompressor: report file complete after it is read



commit abeed5c57caf9321caaa0647e9fd23bfc258b03b
Author: Razvan Chitu <razvan ch95 gmail com>
Date:   Mon Aug 22 19:53:27 2016 +0300

    AutoarCompressor: report file complete after it is read
    
    When compressing, files are reported as completed before they were actually
    read. Fix this by marking the file as completed after it is read.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=770247

 gnome-autoar/autoar-compressor.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/gnome-autoar/autoar-compressor.c b/gnome-autoar/autoar-compressor.c
index e3f015b..5b0f5a5 100644
--- a/gnome-autoar/autoar-compressor.c
+++ b/gnome-autoar/autoar-compressor.c
@@ -720,8 +720,6 @@ autoar_compressor_do_write_data (AutoarCompressor     *self,
     if (istream == NULL)
       return;
 
-    self->completed_files++;
-
     do {
       read_actual = g_input_stream_read (istream,
                                          self->buffer,
@@ -746,6 +744,7 @@ autoar_compressor_do_write_data (AutoarCompressor     *self,
       }
     } while (read_actual > 0 && written_actual >= 0);
 
+    self->completed_files++;
 
     g_input_stream_close (istream, self->cancellable, NULL);
     g_object_unref (istream);


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