Skip to content

Conversation

@aasim
Copy link
Member

@aasim aasim commented Nov 24, 2025

Added a new PathUtilities.GetExtension method that safely handles URIs containing characters that are illegal in file system paths but valid in URIs (e.g., <, >, |, "). This prevents ArgumentException on .NET Framework 4.8 when processing such URIs.

Changes

  • Added PathUtilities.GetExtension method as a static method.
  • Behavior matches .netcore 3.1+ where they don't check for illegal chars.
  • Replaces all occurrences of Path.GetExtension with PathUtilities.GetExtension.
  • Added test to verify this behavior.

Fixes #2271911

@aasim aasim marked this pull request as ready for review November 24, 2025 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant