Merge pull request #469 from suxf/dev

优化微信小游戏文件系统逻辑
pull/470/head
何冠峰 2025-02-12 10:10:32 +08:00 committed by GitHub
commit f60227abdf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

View File

@ -53,7 +53,8 @@ internal class WXFSClearUnusedBundleFilesAsync : FSClearCacheFilesOperation
string bundleGUID = Path.GetFileNameWithoutExtension(fileStat.path); string bundleGUID = Path.GetFileNameWithoutExtension(fileStat.path);
if (_manifest.TryGetPackageBundleByBundleGUID(bundleGUID, out PackageBundle value) == false) if (_manifest.TryGetPackageBundleByBundleGUID(bundleGUID, out PackageBundle value) == false)
{ {
_unusedCacheFiles.Add(fileStat.path); string fullPath = WX.GetCachePath(fileStat.path);
if (!_unusedCacheFiles.Contains(fullPath)) _unusedCacheFiles.Add(fullPath);
} }
} }

View File

@ -183,6 +183,11 @@ internal class WechatFileSystem : IFileSystem
throw new System.Exception("请配置微信小游戏缓存根目录!"); throw new System.Exception("请配置微信小游戏缓存根目录!");
} }
if (!_wxCacheRoot.StartsWith(WX.PluginCachePath))
{
_wxCacheRoot = PathUtility.Combine(WX.PluginCachePath, _wxCacheRoot);
}
// 注意CDN服务未启用的情况下使用微信WEB服务器 // 注意CDN服务未启用的情况下使用微信WEB服务器
if (RemoteServices == null) if (RemoteServices == null)
{ {