Skip to content

Commit 8d8fea0

Browse files
committed
Attempt to fix the encoder for Windows
1 parent 25f24a5 commit 8d8fea0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/DotNext/IO/FileUri.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ private static bool TryEncodeCore(ReadOnlySpan<char> fileName, UrlEncoder encode
9292
}
9393
else
9494
{
95-
writer.Add(slash);
95+
writer.Add(Path.DirectorySeparatorChar);
9696
}
9797

9898
while (!fileName.IsEmpty)
@@ -116,7 +116,7 @@ private static bool TryEncodeCore(ReadOnlySpan<char> fileName, UrlEncoder encode
116116

117117
writer.Advance(charsWritten);
118118
if (index >= 0)
119-
writer.Add(slash);
119+
writer.Add(Path.DirectorySeparatorChar);
120120
}
121121

122122
charsWritten = writer.WrittenCount;

0 commit comments

Comments
 (0)