Closed Hronom closed 8 years ago
Previously for this path:
C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\test#servlet\WEB-INF\lib\heideltime-2.1.jar
if we use:
this.getClass().getProtectionDomain().getCodeSource().getLocation().getPath();
we get escaped path, like this:
C:\Program%20Files\Apache%20Software%20Foundation\Tomcat%208.0\webapps\test#servlet\WEB-INF\lib\heideltime-2.1.jar
so jarFile.isFile() returns false for this path.
I have changed this:
to this:
this.getClass().getProtectionDomain().getCodeSource().getLocation().toURI().getPath();
this one returns proper path.
Thanks a lot for your pull request and sorry for the late reply. We will publish a new HeidelTime version within the next two weeks and I will include this fix.
Previously for this path:
if we use:
we get escaped path, like this:
so jarFile.isFile() returns false for this path.
I have changed this:
to this:
this one returns proper path.