diff --git a/gradle.properties b/gradle.properties index 181e675..08ab029 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,6 +9,6 @@ loader_version=0.9.0+build.204 fabric_version=0.15.0+build.379-1.16.1 # Mod Properties -mod_version = 1.3.2 +mod_version = 1.4.0 maven_group = net.szum123321 archives_base_name = textile_backup \ No newline at end of file diff --git a/src/main/java/net/szum123321/textile_backup/compressors/ParallelGzipCompressor.java b/src/main/java/net/szum123321/textile_backup/compressors/ParallelGzipCompressor.java index 1f28f73..33777a9 100644 --- a/src/main/java/net/szum123321/textile_backup/compressors/ParallelGzipCompressor.java +++ b/src/main/java/net/szum123321/textile_backup/compressors/ParallelGzipCompressor.java @@ -29,26 +29,26 @@ public class ParallelGzipCompressor { File input = in.getCanonicalFile(); - Files.walk(input.toPath() - ).filter(path -> !path.equals(input.toPath()) && - path.toFile().isFile() && - !Utilities.isBlacklisted(input.toPath().relativize(path)) - ).forEach(path -> { - File file = path.toAbsolutePath().toFile(); + Files.walk(input.toPath()) + .filter(path -> !path.equals(input.toPath())) + .filter(path -> path.toFile().isFile()) + .filter(path -> !Utilities.isBlacklisted(input.toPath().relativize(path))) + .forEach(path -> { + File file = path.toAbsolutePath().toFile(); - try (FileInputStream fin = new FileInputStream(file); - BufferedInputStream bfin = new BufferedInputStream(fin)) { - ArchiveEntry entry = arc.createArchiveEntry(file, input.toPath().relativize(path).toString()); + try (FileInputStream fin = new FileInputStream(file); + BufferedInputStream bfin = new BufferedInputStream(fin)) { + ArchiveEntry entry = arc.createArchiveEntry(file, input.toPath().relativize(path).toString()); - arc.putArchiveEntry(entry); - IOUtils.copy(bfin, arc); + arc.putArchiveEntry(entry); + IOUtils.copy(bfin, arc); - arc.closeArchiveEntry(); - } catch (IOException e) { - TextileBackup.LOGGER.error("An exception occurred while trying to compress file: " + path, e); - Utilities.sendError("Something went wrong while compressing files!", ctx); - } - }); + arc.closeArchiveEntry(); + } catch (IOException e) { + TextileBackup.LOGGER.error("An exception occurred while trying to compress file: " + path, e); + Utilities.sendError("Something went wrong while compressing files!", ctx); + } + }); arc.finish(); } catch (IOException e) {