[gnome-autoar] AutoarCreate: Force progress to be updated after all files are archived
- From: Ting-Wei Lan <lantw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-autoar] AutoarCreate: Force progress to be updated after all files are archived
- Date: Fri, 13 Sep 2013 03:17:28 +0000 (UTC)
commit 5c32f573c43a3021fa7cca38c0af22c55b03bbf6
Author: Ting-Wei Lan <lantw44 gmail com>
Date: Fri Sep 13 11:15:07 2013 +0800
AutoarCreate: Force progress to be updated after all files are archived
gnome-autoar/autoar-create.c | 11 ++++++++---
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]