From b65ec479a0f596528fc2c3eaa17960636678f485 Mon Sep 17 00:00:00 2001 From: Elivo Date: Fri, 24 Oct 2025 13:16:52 +0800 Subject: [PATCH] =?UTF-8?q?ReadFile=EF=BC=8C=E6=94=AF=E6=8C=81=E8=AF=BB?= =?UTF-8?q?=E5=8F=96=E5=85=B6=E5=AE=83=E7=A8=8B=E5=BA=8F=E7=9A=84=20Log=20?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Apewer/StorageUtility.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Apewer/StorageUtility.cs b/Apewer/StorageUtility.cs index 9dce080..49f5510 100644 --- a/Apewer/StorageUtility.cs +++ b/Apewer/StorageUtility.cs @@ -506,7 +506,7 @@ namespace Apewer try { var result = new byte[0]; - using (var stream = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read)) + using (var stream = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) { if (!stream.CanRead) return result; stream.Position = 0; @@ -551,7 +551,9 @@ namespace Apewer } return result; } - catch { } + catch (Exception ex) + { + } } return Constant.EmptyBytes; }