summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTing-Wei Lan <lantw44@gmail.com>2013-09-13 11:15:07 +0800
committerLAN-TW <lantw44@gmail.com>2013-09-13 11:15:07 +0800
commit5c32f573c43a3021fa7cca38c0af22c55b03bbf6 (patch)
treeb21711a323dd31400674d22ee21ad53213e8ab7e
parente72daccdcf8d3add46fc67e93972bd9a9aea6f44 (diff)
downloadgsoc2013-libgnome-autoar-5c32f573c43a3021fa7cca38c0af22c55b03bbf6.tar
gsoc2013-libgnome-autoar-5c32f573c43a3021fa7cca38c0af22c55b03bbf6.tar.gz
gsoc2013-libgnome-autoar-5c32f573c43a3021fa7cca38c0af22c55b03bbf6.tar.bz2
gsoc2013-libgnome-autoar-5c32f573c43a3021fa7cca38c0af22c55b03bbf6.tar.lz
gsoc2013-libgnome-autoar-5c32f573c43a3021fa7cca38c0af22c55b03bbf6.tar.xz
gsoc2013-libgnome-autoar-5c32f573c43a3021fa7cca38c0af22c55b03bbf6.tar.zst
gsoc2013-libgnome-autoar-5c32f573c43a3021fa7cca38c0af22c55b03bbf6.zip
AutoarCreate: Force progress to be updated after all files are archived
-rw-r--r--gnome-autoar/autoar-create.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/gnome-autoar/autoar-create.c b/gnome-autoar/autoar-create.c
index c6e0f58..9ec04c3 100644
--- a/gnome-autoar/autoar-create.c
+++ b/gnome-autoar/autoar-create.c
@@ -273,7 +273,7 @@ autoar_create_get_output_is_dest (AutoarCreate *arcreate)
gint64
autoar_create_get_notify_interval (AutoarCreate *arcreate)
{
- g_return_val_if_fail (AUTOAR_IS_CREATE (arcreate), G_MININT64);
+ g_return_val_if_fail (AUTOAR_IS_CREATE (arcreate), 0);
return arcreate->priv->notify_interval;
}
@@ -1026,6 +1026,8 @@ autoar_create_init (AutoarCreate *arcreate)
priv->files = 0;
priv->completed_files = 0;
+ priv->notify_last = 0;
+
priv->ostream = NULL;
priv->buffer_size = BUFFER_SIZE;
priv->buffer = g_new (char, priv->buffer_size);
@@ -1391,10 +1393,13 @@ autoar_create_step_create (AutoarCreate *arcreate)
static void
autoar_create_step_cleanup (AutoarCreate *arcreate)
{
- /* Step 3: Close the libarchive object. We do not have to do other cleanup
- * because they are handled in dispose and finalize functions. */
+ /* Step 3: Close the libarchive object and force progress to be updated.
+ * We do not have to do other cleanup because they are handled in dispose
+ * and finalize functions. */
AutoarCreatePrivate *priv;
priv = arcreate->priv;
+ priv->notify_last = 0;
+ autoar_create_signal_progress (arcreate);
if (archive_write_close (priv->a) != ARCHIVE_OK) {
if (priv->error == NULL)
priv->error = autoar_common_g_error_new_a (priv->a, priv->output);