Mailinglist Archive: zypp-commit (233 mails)

< Previous Next >
[zypp-commit] <libzypp> master : ChecksumFileChecker: Don't compute checksum if it is not needed.
  • From: Michael Andres <ma@xxxxxxx>
  • Date: Thu, 12 Nov 2009 10:57:46 +0100
  • Message-id: <E1N8WRI-0006Qm-ER@xxxxxxxxxxxxxxxx>
ref: refs/heads/master
commit 1c0b43bd768e959f32a3b1e1588ba505d87c12b9
Author: Michael Andres <ma@xxxxxxx>
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@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages