summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/network/access/qnetworkdiskcache.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/network/access/qnetworkdiskcache.cpp b/src/network/access/qnetworkdiskcache.cpp
index fa0fccb..93360c8 100644
--- a/src/network/access/qnetworkdiskcache.cpp
+++ b/src/network/access/qnetworkdiskcache.cpp
@@ -253,7 +253,8 @@ void QNetworkDiskCachePrivate::storeItem(QCacheItem *cacheItem)
// ### use atomic rename rather then remove & rename
if (cacheItem->file->rename(fileName))
currentCacheSize += cacheItem->file->size();
- cacheItem->file->setAutoRemove(true);
+ else
+ cacheItem->file->setAutoRemove(true);
}
if (cacheItem->metaData.url() == lastItem.metaData.url())
lastItem.reset();