优化微信小游戏文件系统逻辑

pull/469/head
枫似锦 2025-02-12 00:29:10 +08:00
parent 0a85f3126f
commit 03d06ba657
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);
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("请配置微信小游戏缓存根目录!");
}
if (!_wxCacheRoot.StartsWith(WX.PluginCachePath))
{
_wxCacheRoot = PathUtility.Combine(WX.PluginCachePath, _wxCacheRoot);
}
// 注意CDN服务未启用的情况下使用微信WEB服务器
if (RemoteServices == null)
{