mirror of
https://github.com/iBotPeaches/Apktool.git
synced 2024-11-26 22:10:37 +00:00
Sort files list in FileDirectory::loadAll() (#3657)
This lets us assemble classes.dex in a reproducible manner. Test: apktool d test.apk > /dev/null apktool b test > /dev/null sha1sum test/build/apk/classes.dex apktool -f d test.apk > /dev/null apktool b test > /dev/null sha1sum test/build/apk/classes.dex
This commit is contained in:
parent
7ad1c9f9b4
commit
9ebd579475
@ -18,6 +18,8 @@ package brut.directory;
|
||||
|
||||
import java.io.*;
|
||||
import java.net.URLDecoder;
|
||||
import java.util.Arrays;
|
||||
import java.util.Comparator;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.LinkedHashSet;
|
||||
|
||||
@ -107,6 +109,8 @@ public class FileDirectory extends AbstractDirectory {
|
||||
mDirs = new LinkedHashMap<>();
|
||||
|
||||
File[] files = getDir().listFiles();
|
||||
Arrays.sort(files, Comparator.comparing(f -> f.getName()));
|
||||
|
||||
for (File file : files) {
|
||||
if (file.isFile()) {
|
||||
mFiles.add(file.getName());
|
||||
|
Loading…
Reference in New Issue
Block a user