summaryrefslogtreecommitdiff
path: root/rbutil
diff options
context:
space:
mode:
Diffstat (limited to 'rbutil')
-rw-r--r--rbutil/rbutilqt/httpget.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/rbutil/rbutilqt/httpget.cpp b/rbutil/rbutilqt/httpget.cpp
index 9c102f8c2c..f4e2e04685 100644
--- a/rbutil/rbutilqt/httpget.cpp
+++ b/rbutil/rbutilqt/httpget.cpp
@@ -291,7 +291,7 @@ void HttpGet::httpDone(bool error)
291 if(!outputToBuffer) 291 if(!outputToBuffer)
292 outputFile->close(); 292 outputFile->close();
293 293
294 if(m_usecache && !m_cached) { 294 if(m_usecache && !m_cached && !error) {
295 qDebug() << "[HTTP] creating cache file" << m_cachefile; 295 qDebug() << "[HTTP] creating cache file" << m_cachefile;
296 QFile c(m_cachefile); 296 QFile c(m_cachefile);
297 c.open(QIODevice::ReadWrite); 297 c.open(QIODevice::ReadWrite);
@@ -305,6 +305,10 @@ void HttpGet::httpDone(bool error)
305 305
306 c.close(); 306 c.close();
307 } 307 }
308 // if cached file found and cache enabled ignore http errors
309 if(m_usecache && m_cached && !http.hasPendingRequests()) {
310 error = false;
311 }
308 // take care of concurring requests. If there is still one running, 312 // take care of concurring requests. If there is still one running,
309 // don't emit done(). That request will call this slot again. 313 // don't emit done(). That request will call this slot again.
310 if(http.currentId() == 0 && !http.hasPendingRequests()) 314 if(http.currentId() == 0 && !http.hasPendingRequests())