mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-12 07:56:16 +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
|
* Autopsy Forensic Browser
|
||||||
*
|
*
|
||||||
* Copyright 2011-2016 Basis Technology Corp.
|
* Copyright 2014-2016 Basis Technology Corp.
|
||||||
* Contact: carrier <at> sleuthkit <dot> org
|
* Contact: carrier <at> sleuthkit <dot> org
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* 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
|
* @throws TskCoreException if detection is required and there is a problem
|
||||||
* writing the result to the case database.
|
* writing the result to the case database.
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public String getFileType(AbstractFile file) throws TskCoreException {
|
public String getFileType(AbstractFile file) throws TskCoreException {
|
||||||
String mimeType = file.getMIMEType();
|
String mimeType = file.getMIMEType();
|
||||||
if (null != mimeType) {
|
if (null != mimeType) {
|
||||||
return mimeType;
|
return mimeType;
|
||||||
}
|
}
|
||||||
|
|
||||||
mimeType = detect(file);
|
mimeType = detect(file);
|
||||||
Case.getCurrentCase().getSleuthkitCase().setFileMIMEType(file, mimeType);
|
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;
|
return mimeType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user