Skip to content

Commit

Permalink
Use POSIX mode for large numbers in tar archives (#4384) (#4388)
Browse files Browse the repository at this point in the history
* Use POSIX mode for large numbers in tar archives (#4384)

* PR feedback
  • Loading branch information
schmidt-galen-heb authored Sep 8, 2021
1 parent 8464651 commit 8746f20
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ default void copyFileToContainer(Transferable transferable, String containerPath
TarArchiveOutputStream tarArchive = new TarArchiveOutputStream(byteArrayOutputStream)
) {
tarArchive.setLongFileMode(TarArchiveOutputStream.LONGFILE_POSIX);
tarArchive.setBigNumberMode(TarArchiveOutputStream.BIGNUMBER_POSIX);

transferable.transferTo(tarArchive, containerPath);
tarArchive.finish();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ public void onNext(BuildResponseItem item) {
// To build an image, we have to send the context to Docker in TAR archive format
try (TarArchiveOutputStream tarArchive = new TarArchiveOutputStream(new GZIPOutputStream(out))) {
tarArchive.setLongFileMode(TarArchiveOutputStream.LONGFILE_POSIX);
tarArchive.setBigNumberMode(TarArchiveOutputStream.BIGNUMBER_POSIX);

for (Map.Entry<String, Transferable> entry : transferables.entrySet()) {
Transferable transferable = entry.getValue();
Expand Down

0 comments on commit 8746f20

Please sign in to comment.