Skip to content

Commit a90759b

Browse files
jsuarezruizSuthiYuvaraj
authored andcommitted
Clean up duplicate path normalization code in HybridWebView (dotnet#30873)
1 parent 173ed64 commit a90759b

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
@@ -10,6 +10,7 @@
1010
using Android.Webkit;
1111
using Java.Net;
1212
using Microsoft.Extensions.Logging;
13+
using Microsoft.Maui.Storage;
1314
using AWebView = Android.Webkit.WebView;
1415

1516
namespace Microsoft.Maui.Platform
@@ -141,7 +142,7 @@ public MauiHybridWebViewClient(HybridWebViewHandler handler)
141142
return null;
142143
}
143144

144-
filename = PathUtils.NormalizePath(filename);
145+
filename = FileSystemUtils.NormalizePath(filename);
145146

146147
try
147148
{
@@ -152,15 +153,7 @@ public MauiHybridWebViewClient(HybridWebViewHandler handler)
152153
return null;
153154
}
154155
}
155-
156-
internal static class PathUtils
157-
{
158-
public static string NormalizePath(string filename) =>
159-
filename
160-
.Replace('\\', Path.DirectorySeparatorChar)
161-
.Replace('/', Path.DirectorySeparatorChar);
162-
}
163-
156+
164157
private protected static IDictionary<string, string> GetHeaders(string contentType) =>
165158
new Dictionary<string, string> {
166159
{ "Content-Type", contentType },

0 commit comments

Comments
 (0)