@@ -34,7 +34,7 @@ public static class FileUri
3434 /// <exception cref="ArgumentException"><paramref name="fileName"/> is not fully-qualified.</exception>
3535 public static Uri Encode ( ReadOnlySpan < char > fileName , TextEncoderSettings ? settings = null )
3636 {
37- ThrowIfNotFullyQualified ( fileName ) ;
37+ ThrowIfPartiallyQualified ( fileName ) ;
3838 var encoder = settings is null ? UrlEncoder . Default : UrlEncoder . Create ( settings ) ;
3939 var maxLength = GetMaxEncodedLengthCore ( fileName , encoder ) ;
4040 using var buffer = ( uint ) maxLength <= ( uint ) SpanOwner < char > . StackallocThreshold
@@ -70,13 +70,13 @@ private static int GetMaxEncodedLengthCore(ReadOnlySpan<char> fileName, UrlEncod
7070 /// <exception cref="ArgumentException"><paramref name="fileName"/> is not fully-qualified.</exception>
7171 public static bool TryEncode ( ReadOnlySpan < char > fileName , UrlEncoder ? encoder , Span < char > output , out int charsWritten )
7272 {
73- ThrowIfNotFullyQualified ( fileName ) ;
73+ ThrowIfPartiallyQualified ( fileName ) ;
7474
7575 return TryEncodeCore ( fileName , encoder ?? UrlEncoder . Default , output , out charsWritten ) ;
7676 }
7777
7878 [ StackTraceHidden ]
79- private static void ThrowIfNotFullyQualified ( ReadOnlySpan < char > fileName )
79+ private static void ThrowIfPartiallyQualified ( ReadOnlySpan < char > fileName )
8080 {
8181 if ( ! Path . IsPathFullyQualified ( fileName ) )
8282 throw new ArgumentException ( ExceptionMessages . FullyQualifiedPathExpected , nameof ( fileName ) ) ;
0 commit comments