Fixed sort command output.
This commit is contained in:
parent
c2520f05b7
commit
316d22aecd
1 changed files with 2 additions and 1 deletions
|
@ -26,6 +26,7 @@ import java.io.PrintWriter;
|
||||||
import java.util.zip.GZIPOutputStream;
|
import java.util.zip.GZIPOutputStream;
|
||||||
|
|
||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.io.IOUtils;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
@ -238,7 +239,7 @@ public final class LogFile
|
||||||
PrintWriter out = null;
|
PrintWriter out = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (target.getName().endsWith(".gz"))
|
if (StringUtils.endsWithAny(target.getName(), ".gz", ".gz.tmp"))
|
||||||
{
|
{
|
||||||
out = new PrintWriter(new GZIPOutputStream(new FileOutputStream(target)));
|
out = new PrintWriter(new GZIPOutputStream(new FileOutputStream(target)));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue