mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-02-08 03:30:16 +00:00
Merge remote-tracking branch 'origin/GP-2713_dev747368_sevenzip_fs_initialization--SQUASHED' into Ghidra_10.2
This commit is contained in:
commit
2308e467cd
@ -73,9 +73,11 @@ public class SevenZipFileSystem implements GFileSystem {
|
||||
*/
|
||||
public void mount(ByteProvider byteProvider, TaskMonitor monitor)
|
||||
throws CancelledException, IOException {
|
||||
if (!SevenZipFileSystemFactory.initNativeLibraries()) {
|
||||
throw new IOException("Could not initialize 7zip native libraries");
|
||||
}
|
||||
try {
|
||||
szBPStream = new SZByteProviderStream(byteProvider);
|
||||
SevenZip.initSevenZipFromPlatformJAR(); // calling this multiple times is ok
|
||||
archive = SevenZip.openInArchive(null, szBPStream);
|
||||
archiveFormat = archive.getArchiveFormat();
|
||||
archiveInterface = archive.getSimpleInterface();
|
||||
@ -84,7 +86,7 @@ public class SevenZipFileSystem implements GFileSystem {
|
||||
indexFiles(monitor);
|
||||
ensurePasswords(monitor);
|
||||
}
|
||||
catch (SevenZipException | SevenZipNativeInitializationException e) {
|
||||
catch (SevenZipException e) {
|
||||
throw new IOException("Failed to open archive: " + fsrl, e);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user