This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
[PATCH] Fix a cosmetic problem when there are no packages to install
- From: Jon TURNEY <jon dot turney at dronecode dot org dot uk>
- To: cygwin-apps at cygwin dot com
- Cc: Jon TURNEY <jon dot turney at dronecode dot org dot uk>
- Date: Fri, 22 Jul 2011 14:02:36 +0100
- Subject: [PATCH] Fix a cosmetic problem when there are no packages to install
- References: <20110424161351.GC23944@ednor.casa.cgf.cx>
My previous patch introduces a cosmetic problem when there are no packages
to install.
Calling ThreeBarProgressPage::SetBar2(0, 0) indicates we are -2147483648%
done, while we iterate over all packages looking for packages to md5sum.
So avoid calling SetBar2() in that case.
2011-07-21 Jon TURNEY <jon.turney@dronecode.org.uk>
* install.cc (do_install_thread): Fix cosmetic problem when
there are no packages to install.
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
---
install.cc | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/install.cc b/install.cc
index 9f13d7b..882c0e5 100644
--- a/install.cc
+++ b/install.cc
@@ -700,7 +700,8 @@ do_install_thread (HINSTANCE h, HWND owner)
uninstall_q.push_back (&pkg);
}
- Progress.SetBar2 (md5sum_total_bytes_sofar, md5sum_total_bytes);
+ if (md5sum_total_bytes > 0)
+ Progress.SetBar2 (md5sum_total_bytes_sofar, md5sum_total_bytes);
}
/* start with uninstalls - remove files that new packages may replace */
--
1.7.5.1