Update patch manifest

This commit is contained in:
hevinci
2022-07-25 15:46:20 +08:00
parent e5c7bbdf52
commit d0b7ae020c
10 changed files with 86 additions and 35 deletions
@@ -391,7 +391,7 @@ namespace YooAsset
// 注意:在弱联网模式下,我们需要验证指定资源版本的所有资源完整性
if (weaklyUpdate)
{
string filePath = SandboxHelper.MakeCacheFilePath(patchBundle.Hash);
string filePath = SandboxHelper.MakeCacheFilePath(patchBundle.FileName);
if (File.Exists(filePath))
_waitingList.Add(patchBundle);
else
@@ -399,7 +399,7 @@ namespace YooAsset
}
else
{
string filePath = SandboxHelper.MakeCacheFilePath(patchBundle.Hash);
string filePath = SandboxHelper.MakeCacheFilePath(patchBundle.FileName);
if (File.Exists(filePath))
_waitingList.Add(patchBundle);
}
@@ -451,7 +451,7 @@ namespace YooAsset
private bool RunThread(PatchBundle patchBundle)
{
string filePath = SandboxHelper.MakeCacheFilePath(patchBundle.Hash);
string filePath = SandboxHelper.MakeCacheFilePath(patchBundle.FileName);
ThreadInfo info = new ThreadInfo(filePath, patchBundle);
return ThreadPool.QueueUserWorkItem(new WaitCallback(VerifyInThread), info);
}
@@ -467,7 +467,7 @@ namespace YooAsset
if (info.Result)
{
VerifySuccessCount++;
DownloadSystem.CacheVerifyFile(info.Bundle.Hash, info.Bundle.BundleName);
DownloadSystem.CacheVerifyFile(info.Bundle.Hash, info.Bundle.FileName);
}
else
{
@@ -211,7 +211,7 @@ namespace YooAsset
// 注意:通过比对文件大小做快速的文件校验!
// 注意:在初始化的时候会去做最终校验!
string filePath = SandboxHelper.MakeCacheFilePath(patchBundle.Hash);
string filePath = SandboxHelper.MakeCacheFilePath(patchBundle.FileName);
if (File.Exists(filePath))
{
long fileSize = FileUtility.GetFileSize(filePath);