mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
Revert "Stop creating file type attributes on gen info artifacts"
This reverts commit 5711bff04523d3209ec6b4b35be04241210ce6e3.
This commit is contained in:
parent
e41cebbe9d
commit
d4a076d1e5
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2011-2016 Basis Technology Corp.
|
||||
* Copyright 2014-2016 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -139,13 +139,26 @@ public class FileTypeDetector {
|
||||
* @throws TskCoreException if detection is required and there is a problem
|
||||
* writing the result to the case database.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public String getFileType(AbstractFile file) throws TskCoreException {
|
||||
String mimeType = file.getMIMEType();
|
||||
if (null != mimeType) {
|
||||
return mimeType;
|
||||
}
|
||||
|
||||
mimeType = detect(file);
|
||||
Case.getCurrentCase().getSleuthkitCase().setFileMIMEType(file, mimeType);
|
||||
|
||||
/*
|
||||
* Add the file type attribute to the general info artifact. Note that
|
||||
* no property change is fired for this blackboard posting because
|
||||
* general info artifacts are different from other artifacts, e.g., they
|
||||
* are not displayed in the results tree.
|
||||
*/
|
||||
BlackboardArtifact getInfoArt = file.getGenInfoArtifact();
|
||||
BlackboardAttribute batt = new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_FILE_TYPE_SIG, FileTypeIdModuleFactory.getModuleName(), mimeType);
|
||||
getInfoArt.addAttribute(batt);
|
||||
|
||||
return mimeType;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user