You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[new Uri(uri, ".")] in UriHelper.GetBaseUri(Uri uri) cannot process files in the jar:file:// path, and an error message is displayed.
It is recommended to change GetBaseUri(Uri uri) to public static Uri GetBaseUri(Uri uri) { return GetParentUri(uri, 1); }
and public static Uri GetParentUri(Uri uri, int level) { if (uri == null) return null; string[] segments = uri.Segments; string uriString = uri.Scheme + ":"; if (!string.IsNullOrEmpty(uri.Host)) { uriString += "//" + uri.Host; } if (segments.Length >= level) { string parentDirectory = String.Join("", segments, 0, segments.Length - level).Replace("//", "/"); uriString += parentDirectory; } return new Uri(uriString, UriKind.RelativeOrAbsolute); }
The text was updated successfully, but these errors were encountered:
I was able to reproduce the issue. It's the combination of double-schema (jar:file:) and a (escaped) unicode character that causes problems. Since the double-schema is used on Android only, it only surfaced there.
[new Uri(uri, ".")] in UriHelper.GetBaseUri(Uri uri) cannot process files in the jar:file:// path, and an error message is displayed.
It is recommended to change GetBaseUri(Uri uri) to
public static Uri GetBaseUri(Uri uri) { return GetParentUri(uri, 1); }
and
public static Uri GetParentUri(Uri uri, int level) { if (uri == null) return null; string[] segments = uri.Segments; string uriString = uri.Scheme + ":"; if (!string.IsNullOrEmpty(uri.Host)) { uriString += "//" + uri.Host; } if (segments.Length >= level) { string parentDirectory = String.Join("", segments, 0, segments.Length - level).Replace("//", "/"); uriString += parentDirectory; } return new Uri(uriString, UriKind.RelativeOrAbsolute); }
The text was updated successfully, but these errors were encountered: