Sfoglia il codice sorgente

* apt-pkg/acquire-item.cc:
- only verify checksum in pkgAcqFile if we actually have one

Michael Vogt 19 anni fa
parent
commit
2c941d8969
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      apt-pkg/acquire-item.cc

+ 1 - 1
apt-pkg/acquire-item.cc

@@ -1538,7 +1538,7 @@ void pkgAcqFile::Done(string Message,unsigned long Size,string CalcHash,
    Item::Done(Message,Size,CalcHash,Cnf);
    Item::Done(Message,Size,CalcHash,Cnf);
 
 
    // Check the hash
    // Check the hash
-   if(ExpectedHash.toStr() != CalcHash)
+   if(!ExpectedHash.empty() && ExpectedHash.toStr() != CalcHash)
    {
    {
       Status = StatError;
       Status = StatError;
       ErrorText = "Hash Sum mismatch";
       ErrorText = "Hash Sum mismatch";