Skip to content

Commit

Permalink
Sort list of files before processing
Browse files Browse the repository at this point in the history
  • Loading branch information
xDazld committed Apr 29, 2023
1 parent f31ffcc commit 198f648
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions PLYSequence Generator/src/generator/PLYSGenerator.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.StandardCopyOption;
import java.util.Arrays;
import java.util.zip.GZIPOutputStream;

/**
Expand Down Expand Up @@ -60,6 +61,7 @@ public PLYSGenerator(final File[] childFiles, final boolean gzip, final float fr
throws IOException {
fileCount = childFiles.length;
tempFile = Files.createTempFile(TEMP_PREFIX, PLYS_SUFFIX + (gzip ? ".gz" : ""));
Arrays.sort(childFiles);
try (final OutputStream outputStream = makeOutputStream(tempFile, gzip)) {
final PrintWriter printWriter =
new PrintWriter(outputStream, true, StandardCharsets.UTF_8);
Expand Down

0 comments on commit 198f648

Please sign in to comment.