From a4111349a0518d441ef20da0658097e3b4ab7cfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=95=E5=86=A0=E5=B3=B0?= Date: Tue, 11 Mar 2025 15:40:57 +0800 Subject: [PATCH] fix #502 --- .../Operation/internal/SearchCacheFilesOperation.cs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Assets/YooAsset/Runtime/FileSystem/DefaultCacheFileSystem/Operation/internal/SearchCacheFilesOperation.cs b/Assets/YooAsset/Runtime/FileSystem/DefaultCacheFileSystem/Operation/internal/SearchCacheFilesOperation.cs index 896b2280..7779c73b 100644 --- a/Assets/YooAsset/Runtime/FileSystem/DefaultCacheFileSystem/Operation/internal/SearchCacheFilesOperation.cs +++ b/Assets/YooAsset/Runtime/FileSystem/DefaultCacheFileSystem/Operation/internal/SearchCacheFilesOperation.cs @@ -85,15 +85,22 @@ namespace YooAsset // 创建验证元素类 string fileRootPath = chidDirectory.FullName; - string dataFilePath = $"{fileRootPath}/{ DefaultCacheFileSystemDefine.BundleDataFileName}"; - string infoFilePath = $"{fileRootPath}/{ DefaultCacheFileSystemDefine.BundleInfoFileName}"; + string dataFilePath = $"{fileRootPath}/{DefaultCacheFileSystemDefine.BundleDataFileName}"; + string infoFilePath = $"{fileRootPath}/{DefaultCacheFileSystemDefine.BundleInfoFileName}"; // 存储的数据文件追加文件格式 if (_fileSystem.AppendFileExtension) { string dataFileExtension = FindDataFileExtension(chidDirectory); - if (string.IsNullOrEmpty(dataFileExtension) == false) + if (string.IsNullOrEmpty(dataFileExtension)) + { + //注意:覆盖安装的情况下,缓存文件可能会没有后缀格式,需要删除重新下载! + dataFilePath = string.Empty; + } + else + { dataFilePath += dataFileExtension; + } } var element = new VerifyFileElement(_fileSystem.PackageName, bundleGUID, fileRootPath, dataFilePath, infoFilePath);