From 17e1cc1d71afd391af654a405ef0ff2182dbc271 Mon Sep 17 00:00:00 2001 From: rh101 Date: Mon, 26 Apr 2021 10:45:55 +1000 Subject: [PATCH] Minor code clean-up --- cocos/network/CCDownloader-curl.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cocos/network/CCDownloader-curl.cpp b/cocos/network/CCDownloader-curl.cpp index 711627d103..d2716f779a 100644 --- a/cocos/network/CCDownloader-curl.cpp +++ b/cocos/network/CCDownloader-curl.cpp @@ -820,8 +820,7 @@ void DownloaderCURL::_onDownloadFinished(TaskWrapper&& wrapper, int checkState) if (checkState & kCheckSumStateSucceed) // No need download { - FileStream* fsOrigin = - FileUtils::getInstance()->openFileStream(coTask._fileName, FileStream::Mode::READ); + auto* fsOrigin = pFileUtils->openFileStream(coTask._fileName, FileStream::Mode::READ); if (fsOrigin) { fsOrigin->seek(0, SEEK_END); task.progressInfo.totalBytesExpected = fsOrigin->tell();