Skip to content

Commit b35e5be

Browse files
authored
Clean up duplicate path normalization code in HybridWebView (#30873)
1 parent 97451bb commit b35e5be

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

src/Core/src/Platform/Android/MauiHybridWebViewClient.cs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
using System.Web;
1212
using Android.Webkit;
1313
using Microsoft.Extensions.Logging;
14+
using Microsoft.Maui.Storage;
1415
using AWebView = Android.Webkit.WebView;
1516

1617
namespace Microsoft.Maui.Platform
@@ -112,7 +113,7 @@ public MauiHybridWebViewClient(HybridWebViewHandler handler)
112113
return null;
113114
}
114115

115-
filename = PathUtils.NormalizePath(filename);
116+
filename = FileSystemUtils.NormalizePath(filename);
116117

117118
try
118119
{
@@ -123,15 +124,7 @@ public MauiHybridWebViewClient(HybridWebViewHandler handler)
123124
return null;
124125
}
125126
}
126-
127-
internal static class PathUtils
128-
{
129-
public static string NormalizePath(string filename) =>
130-
filename
131-
.Replace('\\', Path.DirectorySeparatorChar)
132-
.Replace('/', Path.DirectorySeparatorChar);
133-
}
134-
127+
135128
private protected static IDictionary<string, string> GetHeaders(string contentType) =>
136129
new Dictionary<string, string> {
137130
{ "Content-Type", contentType },

0 commit comments

Comments
 (0)