Skip to content

Commit

Permalink
fix - Fixed NREs concerning "null" in some situations
Browse files Browse the repository at this point in the history
---

We've fixed NREs on TryParsePath() and TryParseFileName() concerning the "null" string.

---

Type: fix
Breaking: False
Doc Required: False
Part: 1/1
  • Loading branch information
AptiviCEO committed Dec 14, 2023
1 parent 12bd463 commit 5a3653e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Kernel Simulator/Files/Querying/Parsing.vb
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ Namespace Files.Querying
Public Function TryParsePath(Path As String) As Boolean
Try
ThrowOnInvalidPath(Path)
If Path Is Nothing Then Return False
Return Not Path.IndexOfAny(GetInvalidPathChars()) >= 0
Catch ex As Exception
WStkTrc(ex)
Expand All @@ -60,6 +61,7 @@ Namespace Files.Querying
Public Function TryParseFileName(Name As String) As Boolean
Try
ThrowOnInvalidPath(Name)
If Name Is Nothing Then Return False
Return Not Name.IndexOfAny(Path.GetInvalidFileNameChars()) >= 0
Catch ex As Exception
WStkTrc(ex)
Expand Down

0 comments on commit 5a3653e

Please sign in to comment.