This commit is contained in:
何冠峰
2025-05-15 15:38:13 +08:00
parent e71077f294
commit fe7f9bff08
2 changed files with 23 additions and 0 deletions

View File

@@ -198,6 +198,15 @@ internal class WechatFileSystem : IFileSystem
RemoteServices = new WebRemoteServices(webRoot);
}
// 检查URL双斜杠
// 注意:双斜杠会导致微信插件加载文件失败,但网络请求又不返回失败!
{
var mainURL = RemoteServices.GetRemoteMainURL("test.bundle");
var fallbackURL = RemoteServices.GetRemoteFallbackURL("test.bundle");
if (PathUtility.HasDoubleSlashes(mainURL) || PathUtility.HasDoubleSlashes(fallbackURL))
throw new Exception($"{nameof(RemoteServices)} returned URL contains double slashes. !");
}
_fileSystemMgr = WX.GetFileSystemManager();
}
public virtual void OnDestroy()