mirror of
https://github.com/revanced/smali.git
synced 2025-05-02 07:34:28 +02:00
Make sure to truncate the output file before writing the new dex file
This commit is contained in:
parent
2fe6041fa9
commit
231034cf95
@ -195,6 +195,7 @@ public class DexFile {
|
|||||||
|
|
||||||
private void writeTo(@Nonnull String path) throws IOException {
|
private void writeTo(@Nonnull String path) throws IOException {
|
||||||
RandomAccessFile raf = new RandomAccessFile(path, "rw");
|
RandomAccessFile raf = new RandomAccessFile(path, "rw");
|
||||||
|
raf.setLength(0);
|
||||||
try {
|
try {
|
||||||
int dataSectionOffset = getDataSectionOffset();
|
int dataSectionOffset = getDataSectionOffset();
|
||||||
DexWriter headerWriter = outputAt(raf, 0);
|
DexWriter headerWriter = outputAt(raf, 0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user