mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-17 10:17:41 +00:00
Make FileTypeDetector.lookupFileType() more robust
This commit is contained in:
parent
791a27aeb9
commit
ffa0b3ae8a
@ -153,10 +153,13 @@ public class FileTypeDetector {
|
||||
ArrayList<BlackboardAttribute> attributes = file.getGenInfoAttributes(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_FILE_TYPE_SIG);
|
||||
for (BlackboardAttribute attribute : attributes) {
|
||||
/**
|
||||
* There should be at most one TSK_FILE_TYPE_SIG attribute.
|
||||
* There should be at most one TSK_FILE_TYPE_SIG attribute...
|
||||
*/
|
||||
fileType = attribute.getValueString();
|
||||
break;
|
||||
String postedFileType = attribute.getValueString();
|
||||
if (null != postedFileType && !postedFileType.isEmpty()) {
|
||||
fileType = postedFileType;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return fileType;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user