From bf34e278a433615fb298ad18dcde72ba9a626264 Mon Sep 17 00:00:00 2001 From: HorizonCode Date: Thu, 30 Jun 2022 16:20:35 +0200 Subject: [PATCH] remove width detection, not needed --- .../sysbackup/tasks/impl/FileSystemTask.java | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/main/java/net/horizoncode/sysbackup/tasks/impl/FileSystemTask.java b/src/main/java/net/horizoncode/sysbackup/tasks/impl/FileSystemTask.java index f337a53..c1bad25 100644 --- a/src/main/java/net/horizoncode/sysbackup/tasks/impl/FileSystemTask.java +++ b/src/main/java/net/horizoncode/sysbackup/tasks/impl/FileSystemTask.java @@ -41,16 +41,6 @@ public class FileSystemTask extends Task { .getPool() .submit( () -> { - int terminalWidth = -1; - try { - Terminal terminal = TerminalBuilder.terminal(); - try (terminal) { - terminalWidth = terminal.getWidth(); - } - } catch (IOException e) { - throw new RuntimeException(e); - } - try (ZipFile zipFile = new ZipFile(outputZipFile)) { System.out.println("Indexing files..."); ProgressMonitor progressMonitor = zipFile.getProgressMonitor(); @@ -62,8 +52,6 @@ public class FileSystemTask extends Task { .setInitialMax(progressMonitor.getTotalWork()) .setTaskName("Adding Files..."); - if (terminalWidth != -1) pbb.setMaxRenderedLength(terminalWidth); - try (ProgressBar pb = pbb.build()) { while (!progressMonitor.getState().equals(ProgressMonitor.State.READY)) { pb.stepTo(progressMonitor.getWorkCompleted());