ref: refs/heads/master
commit 1c0b43bd768e959f32a3b1e1588ba505d87c12b9
Author: Michael Andres
Date: Thu Nov 12 10:57:46 2009 +0100
ChecksumFileChecker: Don't compute checksum if it is not needed.
---
zypp/FileChecker.cc | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/zypp/FileChecker.cc b/zypp/FileChecker.cc
index 44a98da..d88243c 100644
--- a/zypp/FileChecker.cc
+++ b/zypp/FileChecker.cc
@@ -31,7 +31,6 @@ namespace zypp
{
//MIL << "checking " << file << " file against checksum '" << _checksum << "'" << endl;
callback::SendReport<DigestReport> report;
- CheckSum real_checksum( _checksum.type(), filesystem::checksum( file, _checksum.type() ));
if ( _checksum.empty() )
{
@@ -48,6 +47,7 @@ namespace zypp
}
else
{
+ CheckSum real_checksum( _checksum.type(), filesystem::checksum( file, _checksum.type() ));
if ( (real_checksum != _checksum) )
{
if ( report->askUserToAcceptWrongDigest( file, _checksum.checksum(), real_checksum.checksum() ) )
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org
For additional commands, e-mail: zypp-commit+help@opensuse.org