Skip to content
This repository was archived by the owner on Oct 16, 2020. It is now read-only.

Commit 0c7d038

Browse files
fix #351: "Save as" dialog for C# files has default filter for .cshtml
1 parent bec633d commit 0c7d038

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/FileFilterDoozer.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@ public bool ContainsExtension(string extension)
7171
{
7272
if (string.IsNullOrEmpty(extension))
7373
return false;
74-
int index = this.Extensions.IndexOf("*" + extension, StringComparison.OrdinalIgnoreCase);
75-
if (index < 0 || index + extension.Length > this.Extensions.Length)
74+
int index = Extensions.IndexOf("*" + extension, StringComparison.OrdinalIgnoreCase);
75+
int matchLength = index + extension.Length + 1;
76+
if (index < 0 || matchLength > Extensions.Length)
7677
return false;
77-
return index + extension.Length < this.Extensions.Length
78-
|| this.Extensions[index + extension.Length] == ';';
78+
return matchLength == Extensions.Length || Extensions[matchLength] == ';';
7979
}
8080

8181
public override string ToString()

0 commit comments

Comments
 (0)