Skip to content

Commit c7c1236

Browse files
hansonrhansonr
authored andcommitted
fix for Assets path without file://
1 parent bcf3b0a commit c7c1236

File tree

1 file changed

+1
-1
lines changed
  • sources/net.sf.j2s.java.core/src/javajs/async

1 file changed

+1
-1
lines changed

sources/net.sf.j2s.java.core/src/javajs/async/Assets.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ public static Assets getInstance() {
168168
public static URL getAbsoluteURL(String path) {
169169
URL url = null;
170170
try {
171-
url = (path.indexOf(":/") < 0 ? new File(new File(path).getAbsolutePath()).toURL() : new URL(path));
171+
url = (path.indexOf("file:") == 0 ? new URL(path) : new File(new File(path).getAbsolutePath()).toURI().toURL());
172172
if (path.indexOf("!/")>=0)
173173
url = new URL("jar", null, url.toString());
174174
} catch (MalformedURLException e) {

0 commit comments

Comments
 (0)