Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 91c22dc4 authored by Rex Hoffman's avatar Rex Hoffman Committed by Automerger Merge Worker
Browse files

Support robolectric zip expectations (similar to command line zip) am: a8033c94

parents c07abe9a a8033c94
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -162,10 +162,18 @@ func (w *Writer) Close() error {
		if records > uint16max {
			records = uint16max
		}
		// END ANDROID CHANGE
		// Only store uint32max for the size and the offset if they don't fit.
		// Robolectric currently doesn't support zip64 and fails to find the
		// offset to the central directory when the number of files in the zip
		// is larger than 2^16.
		if size > uint32max {
			size = uint32max
		}
		if offset > uint32max {
			offset = uint32max
		}
		// END ANDROID CHANGE
	}

	// write end record
	var buf [directoryEndLen]byte