Browse Source

ReadFile,支持读取其它程序的 Log 文件。

master
王厅 2 weeks ago
parent
commit
b65ec479a0
  1. 6
      Apewer/StorageUtility.cs

6
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;
}

Loading…
Cancel
Save