mirror of
https://github.com/revanced/ARSCLib.git
synced 2025-04-29 22:04:25 +02:00
dispose input source right after buffering
This commit is contained in:
parent
ee03ff9eaa
commit
1525ba586a
@ -59,7 +59,7 @@ class OutputSource {
|
||||
}
|
||||
private EntryBuffer writeBuffer(BufferFileInput input, BufferFileOutput output) throws IOException {
|
||||
long offset = output.position();
|
||||
onWriteBuffer(output);
|
||||
writeBufferFile(output);
|
||||
long length = output.position() - offset;
|
||||
return new EntryBuffer(input, offset, length);
|
||||
}
|
||||
@ -96,7 +96,7 @@ class OutputSource {
|
||||
}
|
||||
dataDescriptor.writeBytes(apkWriter.getOutputStream());
|
||||
}
|
||||
void onWriteBuffer(BufferFileOutput output) throws IOException {
|
||||
private void writeBufferFile(BufferFileOutput output) throws IOException {
|
||||
LocalFileHeader lfh = getLocalFileHeader();
|
||||
|
||||
InputSource inputSource = getInputSource();
|
||||
@ -130,6 +130,8 @@ class OutputSource {
|
||||
lfh.setMethod(ZipEntry.STORED);
|
||||
lfh.setCrc(rawCounter.getCrc());
|
||||
}
|
||||
|
||||
inputSource.disposeInputSource();
|
||||
}
|
||||
|
||||
InputSource getInputSource() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user