From d57e3c33829f15fa41d4adff46a2b1dd3c61cb17 Mon Sep 17 00:00:00 2001 From: sin365 <353374337@qq.com> Date: Tue, 24 Dec 2024 22:48:55 +0800 Subject: [PATCH] =?UTF-8?q?axihttp=E5=9B=BE=E7=89=87=E4=B8=8B=E8=BD=BD?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Assets/Script/AppMain/Manager/CacheManager.cs | 2 +- .../Assets/Script/AppMain/Manager/RomLib/RomFile.cs | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/CacheManager.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/CacheManager.cs index c2ce0b6e..7d5e3b12 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/CacheManager.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/CacheManager.cs @@ -36,7 +36,7 @@ namespace AxibugEmuOnline.Client } AxiHttpProxy.ShowAxiHttpDebugInfo(request.downloadHandler); - if (request.downloadHandler.Err != null) + if (request.downloadHandler.Err == null) { Directory.CreateDirectory(path); File.WriteAllBytes($"{path}/{url.GetHashCode()}", request.downloadHandler.data); diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/RomFile.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/RomFile.cs index d932481a..873799b4 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/RomFile.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/RomFile.cs @@ -137,13 +137,9 @@ namespace AxibugEmuOnline.Client downloadRequest = null; if (request.downloadHandler.Err != null) - { - callback(null); - } + callback(request.downloadHandler.data); else - { - callback(request.downloadHandler.data); - } + callback(null); //downloadRequest = UnityWebRequest.Get($"{App.httpAPI.WebHost}/{webData.url}"); //yield return downloadRequest.SendWebRequest();