Version bump + ParallelGzipCompressor cleanup
This commit is contained in:
parent
8f52745cdd
commit
b81b7d27f8
@ -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
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user