geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From genspr...@apache.org
Subject svn commit: r1037981 - /geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/util/JarUtils.java
Date Tue, 23 Nov 2010 02:54:04 GMT
Author: genspring
Date: Tue Nov 23 02:54:04 2010
New Revision: 1037981

URL: http://svn.apache.org/viewvc?rev=1037981&view=rev
Log:
GERONIMO-5615 Failed to deploy war files after putting server directory under "C:\Documents
and Settings\myDir", we still need to upgrade equinox to 3.6 to resolve the remaining similar
problems in equinox 3.5.1.

Modified:
    geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/util/JarUtils.java

Modified: geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/util/JarUtils.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/util/JarUtils.java?rev=1037981&r1=1037980&r2=1037981&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/util/JarUtils.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/util/JarUtils.java
Tue Nov 23 02:54:04 2010
@@ -31,6 +31,7 @@ import java.io.OutputStream;
 import java.io.Reader;
 import java.net.MalformedURLException;
 import java.net.URL;
+import java.net.URLDecoder;
 import java.util.Enumeration;
 import java.util.jar.JarEntry;
 import java.util.jar.JarFile;
@@ -73,7 +74,7 @@ public final class JarUtils {
             if (url.getProtocol().equalsIgnoreCase("jar")) {
                 // url.openStream() locks the jar file and does not release the lock even
after the stream is closed.
                 // This problem is avoided by using JarFile APIs.
-                File file = new File(url.getFile().substring(5, url.getFile().indexOf("!/")));
+                File file = new File(URLDecoder.decode(url.getFile().substring(5, url.getFile().indexOf("!/")),"UTF-8"));
                 String path = url.getFile().substring(url.getFile().indexOf("!/") + 2);
                 jarFile = new JarFile(file);
                 JarEntry jarEntry = jarFile.getJarEntry(path);



Mime
View raw message