geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lin...@apache.org
Subject svn commit: r731731 - in /geronimo/server/trunk: framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/ plugins/sharedlib/src/main/resources/shared/ plugins/sharedlib/src/main/resources/shared/classes/ plugins/sharedl...
Date Mon, 05 Jan 2009 21:28:44 GMT
Author: linsun
Date: Mon Jan  5 13:28:43 2009
New Revision: 731731

URL: http://svn.apache.org/viewvc?rev=731731&view=rev
Log:
GERONIMO-4479 rework on handling of empty folders Thanks Jarek and Joe for their comments

Removed:
    geronimo/server/trunk/plugins/sharedlib/src/main/resources/shared/EMPTY
    geronimo/server/trunk/plugins/sharedlib/src/main/resources/shared/classes/EMPTY
    geronimo/server/trunk/plugins/sharedlib/src/main/resources/shared/lib/EMPTY
Modified:
    geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/RepositoryConfigurationStore.java

Modified: geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/RepositoryConfigurationStore.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/RepositoryConfigurationStore.java?rev=731731&r1=731730&r2=731731&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/RepositoryConfigurationStore.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/RepositoryConfigurationStore.java
Mon Jan  5 13:28:43 2009
@@ -294,6 +294,11 @@
 
     private void writeToZip(File dir, ZipOutputStream out, String prefix, byte[] buf) throws
IOException {
         File[] all = dir.listFiles();
+        if (all.length == 0) {
+            // it is an empty directory
+            ZipEntry entry = new ZipEntry(prefix);
+            out.putNextEntry(entry); 
+        }
         for (File file : all) {
             if (file.isDirectory()) {
                 writeToZip(file, out, prefix + file.getName() + "/", buf);



Mime
View raw message