diff options
AutoarExtract: Prevent priv->size == 0
This prevent "progress" signal from dividing number by zero.
-rw-r--r-- | gnome-autoar/autoar-extract.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gnome-autoar/autoar-extract.c b/gnome-autoar/autoar-extract.c index 315c855..faf8f39 100644 --- a/gnome-autoar/autoar-extract.c +++ b/gnome-autoar/autoar-extract.c @@ -1814,6 +1814,11 @@ autoar_extract_step_scan_toplevel (AutoarExtract *arextract) return; } + /* If we are unable to determine the total size, set it to a positive + * number to prevent strange percentage. */ + if (priv->size <= 0) + priv->size = G_MAXUINT64; + g_free (pathname_prefix); archive_read_free (a); |