geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xuhaih...@apache.org
Subject svn commit: r897778 - /geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/util/FileUtils.java
Date Mon, 11 Jan 2010 07:38:29 GMT
Author: xuhaihong
Date: Mon Jan 11 07:38:29 2010
New Revision: 897778

URL: http://svn.apache.org/viewvc?rev=897778&view=rev
Log:
Minor fix for FileUtils

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

Modified: geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/util/FileUtils.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/util/FileUtils.java?rev=897778&r1=897777&r2=897778&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/util/FileUtils.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/util/FileUtils.java
Mon Jan 11 07:38:29 2010
@@ -52,7 +52,7 @@
     }
 
     public static void copyFile(File source, File destination, int bufferSizeInBytes) throws
IOException {
-        if (!source.exists() || source.isFile()) {
+        if (!source.exists() || source.isDirectory()) {
             throw new IllegalArgumentException("Source does not exist or it is not a file");
         }
         File destinationDir = destination.getParentFile();
@@ -64,7 +64,7 @@
         try {
             in = new FileInputStream(source);
             out = new FileOutputStream(destination);
-            IOUtils.copy(in, out);
+            IOUtils.copy(in, out, bufferSizeInBytes);
         } finally {
             IOUtils.close(in);
             IOUtils.close(out);



Mime
View raw message