diff options
author | Petr Mrázek <peterix@gmail.com> | 2013-11-17 11:44:18 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2013-11-17 11:44:18 +0100 |
commit | 210629e274a08c592d8f38f7b382c1c5a05a7ab1 (patch) | |
tree | a32ac2426cf6c45c061c05b347f95f2a68439d5a /logic/net/CacheDownload.cpp | |
parent | 2a45302dfc8d63c627fd1164ef84f434f40bd917 (diff) | |
download | MultiMC-210629e274a08c592d8f38f7b382c1c5a05a7ab1.tar MultiMC-210629e274a08c592d8f38f7b382c1c5a05a7ab1.tar.gz MultiMC-210629e274a08c592d8f38f7b382c1c5a05a7ab1.tar.lz MultiMC-210629e274a08c592d8f38f7b382c1c5a05a7ab1.tar.xz MultiMC-210629e274a08c592d8f38f7b382c1c5a05a7ab1.zip |
Use the forge mirrors for downloading forge libraries
Let's hope we never, ever see a forge download error again.
Diffstat (limited to 'logic/net/CacheDownload.cpp')
-rw-r--r-- | logic/net/CacheDownload.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/logic/net/CacheDownload.cpp b/logic/net/CacheDownload.cpp index 4fe4e68e..873d3a2e 100644 --- a/logic/net/CacheDownload.cpp +++ b/logic/net/CacheDownload.cpp @@ -29,7 +29,6 @@ CacheDownload::CacheDownload(QUrl url, MetaEntryPtr entry) m_entry = entry; m_target_path = entry->getFullPath(); m_status = Job_NotStarted; - m_opened_for_saving = false; } void CacheDownload::start() @@ -87,7 +86,7 @@ void CacheDownload::downloadFinished() // nothing went wrong... m_status = Job_Finished; - if (m_opened_for_saving) + if (m_output_file.isOpen()) { // save the data to the downloadable if we aren't saving to file m_output_file.close(); @@ -133,7 +132,7 @@ void CacheDownload::downloadFinished() void CacheDownload::downloadReadyRead() { - if (!m_opened_for_saving) + if (!m_output_file.isOpen()) { if (!m_output_file.open(QIODevice::WriteOnly)) { @@ -144,7 +143,6 @@ void CacheDownload::downloadReadyRead() emit failed(index_within_job); return; } - m_opened_for_saving = true; } QByteArray ba = m_reply->readAll(); md5sum.addData(ba); |