diff options
author | Adam Domurad <[email protected]> | 2013-04-26 12:44:48 -0400 |
---|---|---|
committer | Adam Domurad <[email protected]> | 2013-04-26 12:44:48 -0400 |
commit | 1970f53722f544819fd7b00698c79785c79b3df9 (patch) | |
tree | ba16cc19be024896f96efd1b4793f820261d88f1 /netx/net/sourceforge/jnlp/cache/ResourceTracker.java | |
parent | bb0ced031fcb71d5d93d0a87744689444c5bd948 (diff) |
Decode local-file URLs leniently
Diffstat (limited to 'netx/net/sourceforge/jnlp/cache/ResourceTracker.java')
-rw-r--r-- | netx/net/sourceforge/jnlp/cache/ResourceTracker.java | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/netx/net/sourceforge/jnlp/cache/ResourceTracker.java b/netx/net/sourceforge/jnlp/cache/ResourceTracker.java index dffbb3b..7b6a772 100644 --- a/netx/net/sourceforge/jnlp/cache/ResourceTracker.java +++ b/netx/net/sourceforge/jnlp/cache/ResourceTracker.java @@ -390,7 +390,7 @@ public class ResourceTracker { return resource.localFile; if (location.getProtocol().equalsIgnoreCase("file")) { - File file = new File(location.toURI().getPath()); + File file = UrlUtils.decodeUrlAsFile(location); if (file.exists()) return file; } @@ -401,9 +401,6 @@ public class ResourceTracker { ex.printStackTrace(); return null; // need an error exception to throw - } catch (URISyntaxException e) { - e.printStackTrace(); - return null; } } |