[
http://jira.codehaus.org/browse/PLXUTILS-56?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Benjamin Bentmann closed PLXUTILS-56.
-------------------------------------
Assignee: Benjamin Bentmann
Resolution: Fixed
Fix Version/s: 1.5.2
Fixed in [r7278|
http://fisheye.codehaus.org/changelog/plexus/?cs=7278].
> Improve URL decoding done by FileUtils.toFile()
> -----------------------------------------------
>
> Key: PLXUTILS-56
> URL:
http://jira.codehaus.org/browse/PLXUTILS-56> Project: Plexus Utils
> Issue Type: Bug
> Affects Versions: 1.0.4
> Reporter: Benjamin Bentmann
> Assignee: Benjamin Bentmann
> Fix For: 1.5.2
>
> Attachments: url-to-file.patch
>
>
> A URL like "file:/C:/name%20with%20encoded%20spaces.txt" currently fails to get properly converted to the file path "C:\name with spaces.txt". The problem stems from URL.getFile() returning a raw (i.e. still URL-encoded) substring, see [Sun Bug ID 4466485|
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4466485] for a vivid discussion.
> The attached patch is not perfect, i.e. may still fail for certain URLs as it only decodes selected escape sequences. In the long term, the method should be updated to use java.io.File.<ctor>(java.net.URI) which does the proper decoding.
> The patch includes some minor tweaks to the class which are not related to this issue but I could not resist.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email