tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fha...@apache.org
Subject svn commit: r393613 - /tomcat/container/tc5.5.x/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/ManagerServlet.java
Date Wed, 12 Apr 2006 21:08:03 GMT
Author: fhanik
Date: Wed Apr 12 14:08:01 2006
New Revision: 393613

URL: http://svn.apache.org/viewcvs?rev=393613&view=rev
Log:
http://issues.apache.org/bugzilla/show_bug.cgi?id=36847
Fixes a bug where a WAR file gets overwritten by itself, and results in a 0 byte file
when using the tag parameter in ant deploy

Modified:
    tomcat/container/tc5.5.x/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/ManagerServlet.java

Modified: tomcat/container/tc5.5.x/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/ManagerServlet.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/ManagerServlet.java?rev=393613&r1=393612&r2=393613&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/ManagerServlet.java
(original)
+++ tomcat/container/tc5.5.x/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/ManagerServlet.java
Wed Apr 12 14:08:01 2006
@@ -1502,7 +1502,16 @@
      * @param dest File object representing the destination
      */
     public static boolean copy(File src, File dest) {
-        return copyInternal(src, dest, new byte[4096]);
+        boolean result = false;
+        try {
+            if( src != null &&
+                    !src.getCanonicalPath().equals(dest.getCanonicalPath()) ) {
+                result = copyInternal(src, dest, new byte[4096]);
+            }
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        return result;
     }
 
     



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message