mirror of https://github.com/axmolengine/axmol.git
Merge branch 'vfs-support' into master
This commit is contained in:
commit
ac45a176a3
|
@ -154,7 +154,8 @@ public:
|
|||
_checksumFileName = filename + ".chksum";
|
||||
|
||||
_fsMd5 = FileUtils::getInstance()->openFileStream(_checksumFileName, FileStream::Mode::WRITE);
|
||||
if (_fsMd5->seek(0, SEEK_END) != sizeof(md5_state_s)) {
|
||||
_fsMd5->seek(0, SEEK_END);
|
||||
if (_fsMd5->tell() != sizeof(md5_state_s)) {
|
||||
md5_init(&_md5State);
|
||||
} else {
|
||||
_fsMd5->seek(0, SEEK_SET);
|
||||
|
@ -822,7 +823,8 @@ void DownloaderCURL::_onDownloadFinished(TaskWrapper&& wrapper, int checkState)
|
|||
FileStream* fsOrigin =
|
||||
FileUtils::getInstance()->openFileStream(coTask._fileName, FileStream::Mode::READ);
|
||||
if (fsOrigin) {
|
||||
task.progressInfo.totalBytesExpected = fsOrigin->seek(0, SEEK_END);
|
||||
fsOrigin->seek(0, SEEK_END);
|
||||
task.progressInfo.totalBytesExpected = fsOrigin->tell();
|
||||
task.progressInfo.bytesReceived = task.progressInfo.totalBytesExpected;
|
||||
task.progressInfo.totalBytesReceived = task.progressInfo.totalBytesExpected;
|
||||
task.progressInfo.speedInBytes = task.progressInfo.totalBytesExpected;
|
||||
|
|
Loading…
Reference in New Issue