From 1aaf5693963068d44ca8404b6b6d080357c508bf Mon Sep 17 00:00:00 2001 From: hevinci Date: Mon, 25 Sep 2023 15:08:43 +0800 Subject: [PATCH] fix #167 --- Assets/YooAsset/Runtime/CacheSystem/VerifyElement.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Assets/YooAsset/Runtime/CacheSystem/VerifyElement.cs b/Assets/YooAsset/Runtime/CacheSystem/VerifyElement.cs index fda536b..f2a7d48 100644 --- a/Assets/YooAsset/Runtime/CacheSystem/VerifyElement.cs +++ b/Assets/YooAsset/Runtime/CacheSystem/VerifyElement.cs @@ -28,14 +28,13 @@ namespace YooAsset public void DeleteFiles() { - if (File.Exists(DataFilePath)) + try { - File.Delete(DataFilePath); + Directory.Delete(FileRootPath, true); } - - if (File.Exists(InfoFilePath)) + catch (System.Exception e) { - File.Delete(InfoFilePath); + YooLogger.Warning($"Failed delete cache bundle folder : {e}"); } } }