Skip to content

Commit c758f2b

Browse files
committed
Clarify comment
1 parent f4c785e commit c758f2b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Ramstack.FileSystem.Abstractions/VirtualPath.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,10 +223,12 @@ public static bool IsNormalized(ReadOnlySpan<char> path)
223223
/// </remarks>
224224
public static string Normalize(string path)
225225
{
226+
//
226227
// Short-circuit optimization:
227228
// Many paths are already normalized except for a missing leading slash.
228-
// It's faster and more memory-efficient to first check/add the leading slash
229+
// It's more efficient to first check/add the leading slash
229230
// before performing full normalization.
231+
//
230232

231233
if (!path.StartsWith('/'))
232234
path = $"/{path}";

0 commit comments

Comments
 (0)