[gnome-boxes] downloader: Explicitly close output stream



commit b799201c10c34e3f84ef03d40c86ec956d8dc5fe
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Wed Oct 8 17:51:09 2014 +0100

    downloader: Explicitly close output stream
    
    This is currently not required but in the following patches, we'll start
    to first write to a temporary file and for that its important that all
    output is written to the file, before it can be copied over to the
    actual (cached) file.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=738016

 src/downloader.vala |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/downloader.vala b/src/downloader.vala
index 77e431c..e5ddf83 100644
--- a/src/downloader.vala
+++ b/src/downloader.vala
@@ -159,6 +159,8 @@ private class Boxes.Downloader : GLib.Object {
         if (cancelled_id != 0)
             cancellable.disconnect (cancelled_id);
 
+        yield cached_file_stream.close_async (Priority.DEFAULT, cancellable);
+
         if (msg.status_code != Soup.Status.OK) {
             download.cached_file.delete ();
             if (err == null)


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