[Schmitzm-commits] r1594 - branches/2.5/schmitzm-core/src/main/java/de/schmitzm/io

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Sat May 28 22:42:02 CEST 2011


Author: alfonx
Date: 2011-05-28 22:42:02 +0200 (Sat, 28 May 2011)
New Revision: 1594

Modified:
   branches/2.5/schmitzm-core/src/main/java/de/schmitzm/io/IOUtil.java
Log:


Modified: branches/2.5/schmitzm-core/src/main/java/de/schmitzm/io/IOUtil.java
===================================================================
--- branches/2.5/schmitzm-core/src/main/java/de/schmitzm/io/IOUtil.java	2011-05-28 20:01:57 UTC (rev 1593)
+++ branches/2.5/schmitzm-core/src/main/java/de/schmitzm/io/IOUtil.java	2011-05-28 20:42:02 UTC (rev 1594)
@@ -1536,7 +1536,13 @@
 
 	public static void zipFile(File inputFile, ZipOutputStream zos, File cutOff)
 			throws IOException {
-		zipFile(inputFile, zos, cutOff.getAbsolutePath().length());
+		
+		String absolutePath = cutOff.getAbsolutePath();
+		int l = absolutePath.length();
+		if (!absolutePath.endsWith(File.separator))
+			l++;
+		
+		zipFile(inputFile, zos, l);
 	}
 
 	/**



More information about the Schmitzm-commits mailing list