From 08b29b77eb5a0a3be692eba8a1b56f5d89090c28 Mon Sep 17 00:00:00 2001 From: Maik Stegemann Date: Tue, 17 Oct 2023 15:48:12 +0200 Subject: [PATCH] specify mode and access-type in `ReadAllBytesAsync` method --- framework/src/Volo.Abp.Core/Volo/Abp/IO/FileHelper.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/IO/FileHelper.cs b/framework/src/Volo.Abp.Core/Volo/Abp/IO/FileHelper.cs index c4daaed745..f4adefd9c3 100644 --- a/framework/src/Volo.Abp.Core/Volo/Abp/IO/FileHelper.cs +++ b/framework/src/Volo.Abp.Core/Volo/Abp/IO/FileHelper.cs @@ -69,7 +69,7 @@ public static class FileHelper /// A string containing all lines of the file. public static async Task ReadAllBytesAsync(string path) { - using (var stream = File.Open(path, FileMode.Open)) + using (var stream = File.Open(path, FileMode.Open, FileAccess.Read, FileShare.Read)) { var result = new byte[stream.Length]; await stream.ReadAsync(result, 0, (int)stream.Length);