diff options
author | Jose Medrano <josmed@microsoft.com> | 2019-09-13 02:06:18 +0300 |
---|---|---|
committer | Jose Medrano <josmed@microsoft.com> | 2019-09-13 02:06:18 +0300 |
commit | d95b9cd2331ed70304d338d80172ee1c958fdc32 (patch) | |
tree | d68fe7ce1f07367dce92e1e5a33962687daf15e7 /main/src/addins/MonoDevelop.HexEditor | |
parent | 08e5fcf801d722a0cff3207e9565b124922b5769 (diff) |
Fixes a System.AggregateException trying opening HexEditor document
Fixes VSTS #978857 - [HexEditor] View failed to load. System.AggregateException:EnsureUIThread
This is a temporal fix to cover an issue with mono implementation with FileStream
Diffstat (limited to 'main/src/addins/MonoDevelop.HexEditor')
-rw-r--r-- | main/src/addins/MonoDevelop.HexEditor/Mono.MHex.Data/ByteBufferModel.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/main/src/addins/MonoDevelop.HexEditor/Mono.MHex.Data/ByteBufferModel.cs b/main/src/addins/MonoDevelop.HexEditor/Mono.MHex.Data/ByteBufferModel.cs index dbdbbdfacb..57ea31a50a 100644 --- a/main/src/addins/MonoDevelop.HexEditor/Mono.MHex.Data/ByteBufferModel.cs +++ b/main/src/addins/MonoDevelop.HexEditor/Mono.MHex.Data/ByteBufferModel.cs @@ -60,7 +60,7 @@ namespace Mono.MHex.Data { byteBuffer = new ByteBuffer (); byteBuffer.Replaced += ByteBuffer_Replaced; - using (var stream = File.OpenRead (FilePath)) { + using (var stream = new FileStream (FilePath, FileMode.Open, FileAccess.Read, FileShare.Read, 1024, true)) { byteBuffer.Buffer = await ArrayBuffer.LoadAsync (stream); } } |