aboutsummaryrefslogtreecommitdiffstats
path: root/netx
diff options
context:
space:
mode:
authorAdam Domurad <[email protected]>2013-04-23 13:47:42 -0400
committerAdam Domurad <[email protected]>2013-04-23 13:47:42 -0400
commit29e4dba60a7ee935ee93e6cb1338554af2bf88ed (patch)
tree076c68aca9cf2071835e960cf6b9f944ba0c0eb7 /netx
parent34e760c5e2abfb36347253b246375897f5e68a8d (diff)
Ensure document-base is properly encoded
Diffstat (limited to 'netx')
-rw-r--r--netx/net/sourceforge/jnlp/cache/ResourceTracker.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/netx/net/sourceforge/jnlp/cache/ResourceTracker.java b/netx/net/sourceforge/jnlp/cache/ResourceTracker.java
index 898594f..36ef3c6 100644
--- a/netx/net/sourceforge/jnlp/cache/ResourceTracker.java
+++ b/netx/net/sourceforge/jnlp/cache/ResourceTracker.java
@@ -398,7 +398,7 @@ public class ResourceTracker {
return resource.localFile;
if (location.getProtocol().equalsIgnoreCase("file")) {
- File file = new File(location.getFile());
+ File file = new File(location.toURI().getPath());
if (file.exists())
return file;
}
@@ -409,6 +409,9 @@ public class ResourceTracker {
ex.printStackTrace();
return null; // need an error exception to throw
+ } catch (URISyntaxException e) {
+ e.printStackTrace();
+ return null;
}
}