Skip to content

Commit 03b3a03

Browse files
authored
Merge pull request #514 from tonyhallett/fix-line-coverage-file-deletion
fix
2 parents 30dcc6d + 8293a36 commit 03b3a03

File tree

1 file changed

+1
-1
lines changed
  • SharedProject/Editor/DynamicCoverage/Utilities

1 file changed

+1
-1
lines changed

SharedProject/Editor/DynamicCoverage/Utilities/TextInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public TextInfo(ITextView textView, ITextBuffer textBuffer)
3636
public ITextView TextView { get; }
3737
public ITextBuffer2 TextBuffer { get; }
3838
public string FilePath => this.TextDocument?.FilePath;
39-
public string GetFileText() => File.ReadAllText(this.FilePath);
39+
public string GetFileText() => File.Exists(this.FilePath) ? File.ReadAllText(this.FilePath) : null;
4040
public DateTime GetLastWriteTime() => new FileInfo(this.FilePath).LastWriteTime;
4141
}
4242
}

0 commit comments

Comments
 (0)