We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f4c785e commit c758f2bCopy full SHA for c758f2b
src/Ramstack.FileSystem.Abstractions/VirtualPath.cs
@@ -223,10 +223,12 @@ public static bool IsNormalized(ReadOnlySpan<char> path)
223
/// </remarks>
224
public static string Normalize(string path)
225
{
226
+ //
227
// Short-circuit optimization:
228
// Many paths are already normalized except for a missing leading slash.
- // 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
230
// before performing full normalization.
231
232
233
if (!path.StartsWith('/'))
234
path = $"/{path}";
0 commit comments