Fixed: Downloaded css file was not used

--HG--
branch : develop
feature/streamed-package
Nimetu 5 years ago
parent fc9d423c94
commit fec9975f58

@ -659,10 +659,12 @@ namespace NLGUI
if (download.type == StylesheetType) if (download.type == StylesheetType)
{ {
// no tmpfile if file was already in cache if (CFile::fileExists(tmpfile))
if (CFile::fileExists(tmpfile) && CFile::fileExists(download.dest))
{ {
CFile::deleteFile(download.dest); if (CFile::fileExists(download.dest))
{
CFile::deleteFile(download.dest);
}
CFile::moveFile(download.dest, tmpfile); CFile::moveFile(download.dest, tmpfile);
} }
cssDownloadFinished(download.url, download.dest); cssDownloadFinished(download.url, download.dest);

Loading…
Cancel
Save