mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-13 08:26:15 +00:00
Don't load file if not needed
This commit is contained in:
parent
a9ac434e88
commit
e36417be26
@ -51,7 +51,7 @@ public class FileTypeDetector {
|
|||||||
private final List<FileType> userDefinedFileTypes;
|
private final List<FileType> userDefinedFileTypes;
|
||||||
private final List<FileType> autopsyDefinedFileTypes;
|
private final List<FileType> autopsyDefinedFileTypes;
|
||||||
private static SortedSet<String> tikaDetectedTypes;
|
private static SortedSet<String> tikaDetectedTypes;
|
||||||
private final int defaultBufferSize = 2048; // Number of bytes to initially read from the file. Should cover most signatures.
|
private final int defaultBufferSize = 600; // Number of bytes to initially read from the file. Should cover most signatures.
|
||||||
|
|
||||||
private static final Object timingLock = new Object();
|
private static final Object timingLock = new Object();
|
||||||
private long totalFiles = 0;
|
private long totalFiles = 0;
|
||||||
|
@ -128,6 +128,11 @@ public class FileTypeIdIngestModule implements FileIngestModule {
|
|||||||
* of CustomFileTypesManager.
|
* of CustomFileTypesManager.
|
||||||
*/
|
*/
|
||||||
private FileType detectUserDefinedFileType(AbstractFile file) throws CustomFileTypesManager.CustomFileTypesException {
|
private FileType detectUserDefinedFileType(AbstractFile file) throws CustomFileTypesManager.CustomFileTypesException {
|
||||||
|
|
||||||
|
if (CustomFileTypesManager.getInstance().getUserDefinedFileTypes().isEmpty()) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Read in the beginning of the file once.
|
* Read in the beginning of the file once.
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user