Changed: Ignore cache status when local file has been deleted

--HG--
branch : develop
This commit is contained in:
Nimetu 2017-07-23 22:50:14 +03:00
parent 8300821d0e
commit d6faf81c81

View file

@ -366,8 +366,11 @@ namespace NLGUI
time_t currentTime;
time(&currentTime);
CHttpCacheObject cache = CHttpCache::getInstance()->lookup(download.dest);
if (CFile::fileExists(download.dest) && cache.Expires > currentTime)
CHttpCacheObject cache;
if (CFile::fileExists(download.dest))
cache = CHttpCache::getInstance()->lookup(download.dest);
if (cache.Expires > currentTime)
{
#ifdef LOG_DL
nlwarning("Cache for (%s) is not expired (%s, expires:%d)", download.url.c_str(), download.dest.c_str(), cache.Expires - currentTime);