mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-08 14:19:32 +00:00
New lib and more bugfixes
This commit is contained in:
parent
328dd9d2a7
commit
f18dfaccbb
@ -22,8 +22,6 @@ import java.io.File;
|
|||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.nio.ByteBuffer;
|
|
||||||
import java.nio.charset.StandardCharsets;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
@ -37,15 +35,15 @@ import java.util.logging.Level;
|
|||||||
import net.sf.sevenzipjbinding.ArchiveFormat;
|
import net.sf.sevenzipjbinding.ArchiveFormat;
|
||||||
import static net.sf.sevenzipjbinding.ArchiveFormat.RAR;
|
import static net.sf.sevenzipjbinding.ArchiveFormat.RAR;
|
||||||
import net.sf.sevenzipjbinding.ExtractAskMode;
|
import net.sf.sevenzipjbinding.ExtractAskMode;
|
||||||
import net.sf.sevenzipjbinding.ISequentialOutStream;
|
|
||||||
import net.sf.sevenzipjbinding.SevenZip;
|
|
||||||
import net.sf.sevenzipjbinding.SevenZipException;
|
|
||||||
import net.sf.sevenzipjbinding.SevenZipNativeInitializationException;
|
|
||||||
import net.sf.sevenzipjbinding.ExtractOperationResult;
|
import net.sf.sevenzipjbinding.ExtractOperationResult;
|
||||||
import net.sf.sevenzipjbinding.IArchiveExtractCallback;
|
import net.sf.sevenzipjbinding.IArchiveExtractCallback;
|
||||||
import net.sf.sevenzipjbinding.ICryptoGetTextPassword;
|
import net.sf.sevenzipjbinding.ICryptoGetTextPassword;
|
||||||
import net.sf.sevenzipjbinding.IInArchive;
|
import net.sf.sevenzipjbinding.IInArchive;
|
||||||
|
import net.sf.sevenzipjbinding.ISequentialOutStream;
|
||||||
import net.sf.sevenzipjbinding.PropID;
|
import net.sf.sevenzipjbinding.PropID;
|
||||||
|
import net.sf.sevenzipjbinding.SevenZip;
|
||||||
|
import net.sf.sevenzipjbinding.SevenZipException;
|
||||||
|
import net.sf.sevenzipjbinding.SevenZipNativeInitializationException;
|
||||||
import org.mozilla.universalchardet.UniversalDetector;
|
import org.mozilla.universalchardet.UniversalDetector;
|
||||||
import org.netbeans.api.progress.ProgressHandle;
|
import org.netbeans.api.progress.ProgressHandle;
|
||||||
import org.openide.util.NbBundle;
|
import org.openide.util.NbBundle;
|
||||||
@ -1149,7 +1147,7 @@ class SevenZipExtractor {
|
|||||||
List<byte[]> byteTokens = new ArrayList<>(tokens.size());
|
List<byte[]> byteTokens = new ArrayList<>(tokens.size());
|
||||||
int last = 0;
|
int last = 0;
|
||||||
for (int i = 0; i < filePathBytes.length; i++) {
|
for (int i = 0; i < filePathBytes.length; i++) {
|
||||||
if (filePathBytes[i] == 47 // '/') {
|
if (filePathBytes[i] == '/') {
|
||||||
int len = i - last;
|
int len = i - last;
|
||||||
byte[] arr = new byte[len];
|
byte[] arr = new byte[len];
|
||||||
System.arraycopy(filePathBytes, last, arr, 0, len);
|
System.arraycopy(filePathBytes, last, arr, 0, len);
|
||||||
@ -1189,14 +1187,12 @@ class SevenZipExtractor {
|
|||||||
|
|
||||||
// get the next name in the path and look it up
|
// get the next name in the path and look it up
|
||||||
String childName = tokenPath.remove(0);
|
String childName = tokenPath.remove(0);
|
||||||
|
byte[] childNameBytes = tokenPathBytes.remove(0);
|
||||||
UnpackedNode child = parent.getChild(childName);
|
UnpackedNode child = parent.getChild(childName);
|
||||||
// create new node
|
// create new node
|
||||||
if (child == null) {
|
if (child == null) {
|
||||||
child = new UnpackedNode(childName, parent);
|
child = new UnpackedNode(childName, parent);
|
||||||
if (tokenPathBytes.size() > 0) {
|
|
||||||
byte[] childNameBytes = tokenPathBytes.remove(0);
|
|
||||||
child.setFileNameBytes(childNameBytes);
|
child.setFileNameBytes(childNameBytes);
|
||||||
}
|
|
||||||
parent.addChild(child);
|
parent.addChild(child);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BIN
thirdparty/sevenzip/sevenzipjbinding-AllPlatforms.jar
vendored
Normal file → Executable file
BIN
thirdparty/sevenzip/sevenzipjbinding-AllPlatforms.jar
vendored
Normal file → Executable file
Binary file not shown.
BIN
thirdparty/sevenzip/sevenzipjbinding.jar
vendored
BIN
thirdparty/sevenzip/sevenzipjbinding.jar
vendored
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user