Skip to content

Commit 2908309

Browse files
RohanNagarbrendandburns
authored andcommitted
Use File.OpenRead (#107)
1 parent c0a42ad commit 2908309

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Yaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public static async Task<T> LoadFromStreamAsync<T>(Stream stream) {
1717
}
1818

1919
public static async Task<T> LoadFromFileAsync<T> (string file) {
20-
using (FileStream fs = File.Open(file, FileMode.Open, FileAccess.Write, FileShare.None)) {
20+
using (FileStream fs = File.OpenRead(file)) {
2121
return await LoadFromStreamAsync<T>(fs);
2222
}
2323
}

0 commit comments

Comments
 (0)