diff --git a/shell/windows/LayersShell/App.xaml.cs b/shell/windows/LayersShell/App.xaml.cs index 7fd773e..680f4ff 100644 --- a/shell/windows/LayersShell/App.xaml.cs +++ b/shell/windows/LayersShell/App.xaml.cs @@ -51,7 +51,11 @@ public partial class App : Application try { var path = Path.Combine(Path.GetTempPath(), "layers-shell.log"); - File.AppendAllText(path, DateTime.Now.ToString("HH:mm:ss.fff ") + line + Environment.NewLine); + var text = DateTime.Now.ToString("HH:mm:ss.fff ") + line + Environment.NewLine; + using var fs = new FileStream(path, FileMode.Append, FileAccess.Write, FileShare.Read); + var bytes = System.Text.Encoding.UTF8.GetBytes(text); + fs.Write(bytes, 0, bytes.Length); + fs.Flush(flushToDisk: true); } catch { } }