activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r979977 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/IOHelper.java
Date Wed, 28 Jul 2010 08:07:13 GMT
Author: rajdavies
Date: Wed Jul 28 08:07:12 2010
New Revision: 979977

URL: http://svn.apache.org/viewvc?rev=979977&view=rev
Log:
fixed an issue for copying directories

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/IOHelper.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/IOHelper.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/IOHelper.java?rev=979977&r1=979976&r2=979977&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/IOHelper.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/IOHelper.java Wed
Jul 28 08:07:12 2010
@@ -156,20 +156,19 @@ public final class IOHelper {
         copyFile(src,dest,null);
     }
     
-    public static void copyFile(File src, File dest,FilenameFilter filter) throws IOException
{
+    public static void copyFile(File src, File dest, FilenameFilter filter) throws IOException
{
         if (src.getCanonicalPath().equals(dest.getCanonicalPath()) == false) {
             if (src.isDirectory()) {
-                if (dest.isDirectory()) {
-                    mkdirs(dest);
-                    List<File> list = getFiles(src,filter);
-                    for (File f : list) {
-                        if (f.isFile()) {
-                            File target = new File(getCopyParent(src, dest, f), f.getName());
-                            copySingleFile(f, target);
-                        }
-                    }
 
+                mkdirs(dest);
+                List<File> list = getFiles(src, filter);
+                for (File f : list) {
+                    if (f.isFile()) {
+                        File target = new File(getCopyParent(src, dest, f), f.getName());
+                        copySingleFile(f, target);
+                    }
                 }
+
             } else if (dest.isDirectory()) {
                 mkdirs(dest);
                 File target = new File(dest, src.getName());



Mime
View raw message