mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-12 16:06:15 +00:00
Merge pull request #4380 from wschaeferB/4535-FixSevenzipDeDupe
4535 change path used for detection of existing files to not include data source
This commit is contained in:
commit
c63d0676b0
@ -185,7 +185,7 @@ class SevenZipExtractor {
|
||||
//As a result, many corrupted files have wonky compression ratios and could flood the UI
|
||||
//with false zip bomb notifications. The decision was made to skip compression ratio checks
|
||||
//for unallocated zip files. Instead, we let the depth be an indicator of a zip bomb.
|
||||
if(archiveFile.isMetaFlagSet(TskData.TSK_FS_META_FLAG_ENUM.UNALLOC)) {
|
||||
if (archiveFile.isMetaFlagSet(TskData.TSK_FS_META_FLAG_ENUM.UNALLOC)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -370,12 +370,8 @@ class SevenZipExtractor {
|
||||
* @return the archiveFilePath to be used by the unpack method
|
||||
*/
|
||||
private String getArchiveFilePath(AbstractFile archiveFile) {
|
||||
try {
|
||||
return archiveFile.getUniquePath();
|
||||
} catch (TskCoreException ex) {
|
||||
return archiveFile.getParentPath() + archiveFile.getName();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create the local directories if they do not exist for the archive
|
||||
@ -810,11 +806,11 @@ class SevenZipExtractor {
|
||||
}
|
||||
|
||||
/**
|
||||
* UnpackStream used by the SevenZipBindings to do archive extraction. A memory
|
||||
* leak exists in the SevenZip library that will not let go of the streams until
|
||||
* the entire archive extraction is complete. Instead of creating a new UnpackStream
|
||||
* for every file in the archive, instead we just rebase our EncodedFileOutputStream pointer
|
||||
* for every new file.
|
||||
* UnpackStream used by the SevenZipBindings to do archive extraction. A
|
||||
* memory leak exists in the SevenZip library that will not let go of the
|
||||
* streams until the entire archive extraction is complete. Instead of
|
||||
* creating a new UnpackStream for every file in the archive, instead we
|
||||
* just rebase our EncodedFileOutputStream pointer for every new file.
|
||||
*/
|
||||
private final static class UnpackStream implements ISequentialOutStream {
|
||||
|
||||
@ -854,7 +850,7 @@ class SevenZipExtractor {
|
||||
}
|
||||
|
||||
public void close() throws IOException {
|
||||
try(EncodedFileOutputStream out = output) {
|
||||
try (EncodedFileOutputStream out = output) {
|
||||
out.flush();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user