Skip to content

Commit

Permalink
Try including AltDirectorySeparatorChar.
Browse files Browse the repository at this point in the history
  • Loading branch information
tmds committed Jun 30, 2023
1 parent bb11c82 commit 086aac4
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -442,9 +442,8 @@ private static bool IsChildPath(string parentFullPath, string childFullPath)

return childFullPath.StartsWith(parentFullPath, PathInternal.StringComparison);

// We don't need to check for AltDirectorySeparatorChar, full paths are normalized to DirectorySeparatorChar.
static bool IsDirectorySeparatorChar(char c)
=> c == Path.DirectorySeparatorChar;
=> c == Path.DirectorySeparatorChar || c == Path.AltDirectorySeparatorChar;
}
}
}

0 comments on commit 086aac4

Please sign in to comment.