diff --git a/Source/ControlLog.xaml.cs b/Source/ControlLog.xaml.cs index 9e792fe..dd6cb5a 100644 --- a/Source/ControlLog.xaml.cs +++ b/Source/ControlLog.xaml.cs @@ -89,7 +89,7 @@ public void Load(string filePath, CancellationToken ct) { byte[] tempBuffer = new byte[1024 * 1024]; - this.fileStream = new FileStream(filePath, FileMode.Open, FileAccess.Read); + this.fileStream = new FileStream(filePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite); FileInfo fileInfo = new FileInfo(filePath); // Calcs and finally point the position to the end of the line diff --git a/Source/LogFile.cs b/Source/LogFile.cs index bb2daef..e4d2e0f 100644 --- a/Source/LogFile.cs +++ b/Source/LogFile.cs @@ -78,7 +78,7 @@ public void Load(string filePath, SynchronizationContext st, CancellationToken c { byte[] tempBuffer = new byte[1024 * 1024]; - this.fileStream = new FileStream(filePath, FileMode.Open, FileAccess.Read); + this.fileStream = new FileStream(filePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite); FileInfo fileInfo = new FileInfo(filePath); // Calcs and finally point the position to the end of the line