Skip to content

Commit

Permalink
Issue #12723 fix file:/ uris on windows for osgi
Browse files Browse the repository at this point in the history
  • Loading branch information
janbartel committed Jan 22, 2025
1 parent dc685b6 commit 97544a1
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

import org.eclipse.jetty.osgi.OSGiServerConstants;
import org.eclipse.jetty.util.StringUtil;
import org.eclipse.jetty.util.URIUtil;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.Filter;
Expand Down Expand Up @@ -61,7 +62,7 @@ public static URI resolvePathAsLocalizedURI(String path, Bundle bundle, Path jet
return null;

if (path.startsWith("file:/"))
return new URI(path);
return URIUtil.correctURI(new URI(path));

if (path.startsWith("/") && File.separatorChar != '/')
return new URI("file:" + path);
Expand Down

0 comments on commit 97544a1

Please sign in to comment.