Fixed sort command output.

This commit is contained in:
Christian P. MOMON 2024-07-18 18:19:21 +02:00
parent c2520f05b7
commit 316d22aecd

View file

@ -26,6 +26,7 @@ import java.io.PrintWriter;
import java.util.zip.GZIPOutputStream;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -238,7 +239,7 @@ public final class LogFile
PrintWriter out = null;
try
{
if (target.getName().endsWith(".gz"))
if (StringUtils.endsWithAny(target.getName(), ".gz", ".gz.tmp"))
{
out = new PrintWriter(new GZIPOutputStream(new FileOutputStream(target)));
}