This commit is contained in:
wangzhixun 2025-11-05 10:34:55 +08:00
parent f4c204ca10
commit 5ef0843361
3 changed files with 6 additions and 6 deletions

View File

@ -59,7 +59,7 @@ namespace Cysharp.Threading.Tasks.Internal
}
finally
{
if (lockTaken) locks[index].Exit(false);
}
}

View File

@ -65,7 +65,7 @@ namespace Cysharp.Threading.Tasks
}
finally
{
if (lockTaken) gate.Exit(false);
}
}

View File

@ -471,8 +471,8 @@ public class ZipWrapper : MonoBehaviour
entry = new ZipEntry(entryName);
entry.DateTime = System.DateTime.Now;
if ((null != _zipCallback) && !_zipCallback.OnPreZip(entry))
return true; // 跳过
// 使用 using 语句确保 FileStream 资源被正确释放
using (FileStream fileStream = File.OpenRead(_filePathName))
@ -516,8 +516,8 @@ public class ZipWrapper : MonoBehaviour
entry.DateTime = System.DateTime.Now;
entry.Size = 0;
if ((null != _zipCallback) && !_zipCallback.OnPreZip(entry))
return true; // <20><><EFBFBD><EFBFBD>
_zipOutputStream.PutNextEntry(entry);
_zipOutputStream.Flush();