fix(js/java.cacheFile): 下载出错时保存类出错信息

This commit is contained in:
Xwite
2023-03-25 11:36:18 +08:00
parent 8dc1ac6140
commit 7c3aab712f
2 changed files with 3 additions and 4 deletions
@@ -198,7 +198,7 @@ interface JsExtensions : JsEncodeUtils {
fun cacheFile(urlStr: String, saveTime: Int): String {
val key = md5Encode16(urlStr)
val cahcePath = CacheManager.get(key)
return if (cache.isNullOrBlank()) {
return if (cahcePath.isNullOrBlank()) {
val path = downloadFile(urlStr)
log("首次下载 $urlStr >> $path")
CacheManager.put(key, path, saveTime)