fix: 修复地图资源特殊文件名下载失败

fix #7257
This commit is contained in:
uye
2023-11-15 17:05:48 +08:00
parent 1cebbbe620
commit 8525feea9d
2 changed files with 3 additions and 3 deletions

View File

@@ -65,13 +65,13 @@ namespace MaaWpfGui.Helper
return string.Empty;
}
return _cache.TryGetValue(url, out string ret) ? ret : string.Empty;
return _cache.TryGetValue(url.Replace("#", "%23"), out string ret) ? ret : string.Empty;
}
// ReSharper disable once MemberCanBePrivate.Global
public static void Set(string url, string etag)
{
_cache[url] = etag;
_cache[url.Replace("#", "%23")] = etag;
Save();
}

View File

@@ -232,7 +232,7 @@ namespace MaaWpfGui.Models
{
await Task.Delay(1000);
var sRet = await UpdateFileWithETag(baseUrl, file, file);
var sRet = await UpdateFileWithETag(baseUrl, file.Replace("#", "%23"), file);
if (sRet == UpdateResult.Failed)
{