libs/utils/src/main/java/co/elastic/gradle/utils/ExtractCompressedTar.java [56:74]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public static void extract(final Path archive, final Path destination) throws IOException {
        Files.createDirectories(destination.getParent());
        TarArchiveInputStream tarStream = new TarArchiveInputStream(uncompressedInputStream(archive));
        TarArchiveEntry entry;
        while ((entry = tarStream.getNextTarEntry()) != null) {
            Path entryPath = destination.resolve(entry.getName());

            if (entry.isDirectory()) {
                Files.createDirectories(entryPath);
            } else {
                if (entryPath.getParent() != null) {
                    Files.createDirectories(entryPath.getParent());
                }
                try (OutputStream out = new BufferedOutputStream(Files.newOutputStream(entryPath))) {
                    IOUtils.copy(tarStream, out);
                }
            }
        }
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



plugins/docker/docker-lib/src/main/java/co/elastic/gradle/docker/base/ExtractCompressedTar.java [56:74]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public static void extract(final Path archive, final Path destination) throws IOException {
        Files.createDirectories(destination.getParent());
        TarArchiveInputStream tarStream = new TarArchiveInputStream(uncompressedInputStream(archive));
        TarArchiveEntry entry;
        while ((entry = tarStream.getNextTarEntry()) != null) {
            Path entryPath = destination.resolve(entry.getName());

            if (entry.isDirectory()) {
                Files.createDirectories(entryPath);
            } else {
                if (entryPath.getParent() != null) {
                    Files.createDirectories(entryPath.getParent());
                }
                try (OutputStream out = new BufferedOutputStream(Files.newOutputStream(entryPath))) {
                    IOUtils.copy(tarStream, out);
                }
            }
        }
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



