From 8293a36ed67ed6e3674c4a2be1974ae5795e6d23 Mon Sep 17 00:00:00 2001 From: Tony Hallett Date: Mon, 14 Apr 2025 08:49:19 +0100 Subject: [PATCH] fix --- SharedProject/Editor/DynamicCoverage/Utilities/TextInfo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SharedProject/Editor/DynamicCoverage/Utilities/TextInfo.cs b/SharedProject/Editor/DynamicCoverage/Utilities/TextInfo.cs index 6b1e4203..a5876363 100644 --- a/SharedProject/Editor/DynamicCoverage/Utilities/TextInfo.cs +++ b/SharedProject/Editor/DynamicCoverage/Utilities/TextInfo.cs @@ -36,7 +36,7 @@ public TextInfo(ITextView textView, ITextBuffer textBuffer) public ITextView TextView { get; } public ITextBuffer2 TextBuffer { get; } public string FilePath => this.TextDocument?.FilePath; - public string GetFileText() => File.ReadAllText(this.FilePath); + public string GetFileText() => File.Exists(this.FilePath) ? File.ReadAllText(this.FilePath) : null; public DateTime GetLastWriteTime() => new FileInfo(this.FilePath).LastWriteTime; } }