Skip to content

Path - Fix NullReferenceException that occurs when running on Ubuntu#67

Merged
MichielOda merged 2 commits intomainfrom
FixNullRef
Feb 10, 2026
Merged

Path - Fix NullReferenceException that occurs when running on Ubuntu#67
MichielOda merged 2 commits intomainfrom
FixNullRef

Conversation

@MichielOda
Copy link
Member

@MichielOda MichielOda commented Feb 10, 2026

This pull request improves the robustness of path handling in the PathIOLinux class by making string replacements null-safe and modernizes related unit tests to use FluentAssertions for clearer and more maintainable assertions.

Path handling improvements:

  • Updated SeparatorWrapper in PathIOLinux.cs to use null-conditional operators (?.) when replacing path separators, preventing potential null reference exceptions when pathMethod returns null.

Unit test modernization:

  • Refactored assertions in PathIOLinuxTests.cs to use FluentAssertions, improving readability and reliability of the tests for GetFullPathTest_NoSubFolder_Windows, GetFullPathTest_WithSubFolder_Linux, and GetFullPathTest_WithSubFolder_Windows.

@MichielOda MichielOda merged commit 6f822d0 into main Feb 10, 2026
6 checks passed
@MichielOda MichielOda deleted the FixNullRef branch February 10, 2026 13:12
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