Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified launchable/jar/exe_deploy.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import java.io.IOException;
import java.io.OutputStream;
import java.util.Comparator;
import java.util.List;

import static org.apache.commons.compress.archivers.tar.TarArchiveOutputStream.*;
Expand All @@ -20,6 +21,9 @@ final class FileChunkStreamer extends ChunkStreamer<VirtualFile> {

@Override
protected void writeTo(List<VirtualFile> files, OutputStream os) throws IOException {
// to help the server side deal efficiently with concurrent updates, stream files in a consistent order
files.sort(Comparator.comparing(VirtualFile::path));

try (TarArchiveOutputStream tar = new TarArchiveOutputStream(os, "UTF-8")) {
tar.setLongFileMode(LONGFILE_POSIX);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ public void basics() throws Exception {
try (FileChunkStreamer fs = new FileChunkStreamer(content -> {
switch(count[0]++) {
case 0:
assertThat(readEntries(content)).containsExactly("foo.txt", "bar.txt").inOrder();
assertThat(readEntries(content)).containsExactly("foo.txt", "bar.txt");
break;
case 1:
assertThat(readEntries(content)).containsExactly("zot.txt").inOrder();
assertThat(readEntries(content)).containsExactly("zot.txt");
break;
default:
fail();
Expand Down
Loading