Commit 00120fcd authored by Mathieu Post's avatar Mathieu Post

Fix for a bug that appears when getResource(url) return null

A new File object was created with the url string without the "file://" prefix being removed.
 That would always result in a file that does not exist, so now the prefix is removed.
parent cb663ab7
......@@ -421,7 +421,8 @@ public class StyleSheet {
public void parseFromURL(String url) throws IOException {
URL u = StyleSheet.class.getClassLoader().getResource(url);
if (u == null) {
File f = new File(url);
String fileUrl = url.replace("file://", "");
File f = new File(fileUrl);
if (f.exists())
u = f.toURI().toURL();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment