jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tri...@apache.org
Subject svn commit: r415712 - /jackrabbit/trunk/jcr-server/server/src/java/org/apache/jackrabbit/server/io/ZipHandler.java
Date Tue, 20 Jun 2006 15:27:34 GMT
Author: tripod
Date: Tue Jun 20 08:27:34 2006
New Revision: 415712

URL: http://svn.apache.org/viewvc?rev=415712&view=rev
Log:
when export root is '/', zip-entries are missing the first character

Modified:
    jackrabbit/trunk/jcr-server/server/src/java/org/apache/jackrabbit/server/io/ZipHandler.java

Modified: jackrabbit/trunk/jcr-server/server/src/java/org/apache/jackrabbit/server/io/ZipHandler.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jcr-server/server/src/java/org/apache/jackrabbit/server/io/ZipHandler.java?rev=415712&r1=415711&r2=415712&view=diff
==============================================================================
--- jackrabbit/trunk/jcr-server/server/src/java/org/apache/jackrabbit/server/io/ZipHandler.java
(original)
+++ jackrabbit/trunk/jcr-server/server/src/java/org/apache/jackrabbit/server/io/ZipHandler.java
Tue Jun 20 08:27:34 2006
@@ -170,7 +170,8 @@
         ZipOutputStream zout = new ZipOutputStream(context.getOutputStream());
         zout.setMethod(ZipOutputStream.DEFLATED);
         try {
-            exportZipEntry(context, zout, contentNode, contentNode.getPath().length()+1);
+            int pos = contentNode.getPath().length();
+            exportZipEntry(context, zout, contentNode, pos > 1 ? pos+1 : pos);
         } finally {
             zout.finish();
         }



Mime
View raw message