Index: logback-core/src/main/java/ch/qos/logback/core/rolling/helper/Compressor.java =================================================================== --- logback-core/src/main/java/ch/qos/logback/core/rolling/helper/Compressor.java (revision 37769) +++ logback-core/src/main/java/ch/qos/logback/core/rolling/helper/Compressor.java (revision 37815) @@ -1,8 +1,8 @@ /** * LOGBack: the reliable, fast and flexible logging library for Java. - * + * * Copyright (C) 1999-2006, QOS.ch - * + * * This library is free software, you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation. @@ -24,7 +24,7 @@ /** * The Compression class implements ZIP and GZ file * compression/decompression methods. - * + * * @author Ceki Gülcü */ public class Compressor extends ContextAwareBase { @@ -37,8 +37,8 @@ public Compressor(CompressionMode compressionMode) { this.compressionMode = compressionMode; } - - + + // public Compressor(CompressionMode compressionMode, String nameOfFile2Compress, String nameOfCompressedFile) { // this.compressionMode = compressionMode; // //this.nameOfFile2Compress = nameOfFile2Compress; @@ -47,7 +47,7 @@ public void compress( String nameOfFile2Compress, String nameOfCompressedFile) { switch(compressionMode) { - case GZ: + case GZ: addInfo("GZ compressing [" + nameOfFile2Compress + "]."); gzCompress(nameOfFile2Compress, nameOfCompressedFile); break; @@ -90,7 +90,7 @@ ZipOutputStream zos = new ZipOutputStream(fos); FileInputStream fis = new FileInputStream(nameOfFile2zip); - ZipEntry zipEntry = new ZipEntry(file2zip.getName()); + ZipEntry zipEntry = new ZipEntry(nameOfZippedFile.substring(0, nameOfZippedFile.length() - 4)); zos.putNextEntry(zipEntry); byte[] inbuf = new byte[8102]; @@ -159,7 +159,7 @@ + nameOfFile2gz + "] into [" + nameOfgzedFile + "].", this, e)); } } - + @Override public String toString() { return "c.q.l.core.rolling.helper.Compress";