wxUpdCheckThread::DownloadUpdatePackage() does the file-existence check before calculating hash, to avoid unnecessary warning in the log

This commit is contained in:
Simon Rozman 2016-05-24 21:45:44 +02:00
parent ff28695e80
commit 66b2934da8

View File

@ -394,7 +394,8 @@ bool wxUpdCheckThread::ReadUpdatePackageMeta()
bool wxUpdCheckThread::DownloadUpdatePackage()
{
// Calculate file hash (if exists).
if (wxFileExists(m_fileName)) {
// Calculate file hash.
wxCryptoHashSHA1 ch(*m_cs);
if (ch.HashFile(m_fileName)) {
wxMemoryBuffer buf;
@ -408,6 +409,7 @@ bool wxUpdCheckThread::DownloadUpdatePackage()
return true;
}
}
}
wxFFile file(m_fileName, wxT("wb"));
if (!file.IsOpened()) {