Skip to content

Commit

Permalink
Update FileExtensions.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp committed Jan 12, 2025
1 parent c1d77d6 commit 4fcb8af
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/EmptyFiles/FileExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,8 @@ public static bool IsTextFile(CharSpan path)
}
}

#if NET6_0_OR_GREATER
var extension = Path.GetExtension(path);
var extension = PathPolyfill.GetExtension(path);
return IsTextExtension(extension);
#else
var extension = Path.GetExtension(path.ToString());
return IsTextExtension(extension);
#endif
}

public static void RemoveTextExtension(string extension)
Expand Down

0 comments on commit 4fcb8af

Please sign in to comment.