mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-17 18:17:43 +00:00
non-files, 0-sized, unalloc, unused blocks marked as octet stream
This commit is contained in:
parent
4508777129
commit
c6e92d8767
@ -101,7 +101,7 @@ public class FileTypeDetector {
|
|||||||
* detection succeeds.
|
* detection succeeds.
|
||||||
*
|
*
|
||||||
* @param file The file to test.
|
* @param file The file to test.
|
||||||
* @return The MIME type name id detection was successful, null otherwise.
|
* @return The MIME type name if detection was successful, null otherwise.
|
||||||
* @throws TskCoreException
|
* @throws TskCoreException
|
||||||
*/
|
*/
|
||||||
public String getFileType(AbstractFile file) throws TskCoreException {
|
public String getFileType(AbstractFile file) throws TskCoreException {
|
||||||
@ -152,11 +152,11 @@ public class FileTypeDetector {
|
|||||||
* @throws TskCoreException
|
* @throws TskCoreException
|
||||||
*/
|
*/
|
||||||
public String detect(AbstractFile file) throws TskCoreException {
|
public String detect(AbstractFile file) throws TskCoreException {
|
||||||
if (!file.isFile() || file.getSize() <= 0) {
|
// consistently mark non-regular files (refer TskData.TSK_FS_META_TYPE_ENUM),
|
||||||
return null;
|
// 0 sized files, unallocated, and unused blocks (refer TskData.TSK_DB_FILES_TYPE_ENUM)
|
||||||
}
|
// as octet-stream.
|
||||||
|
if (!file.isFile() || file.getSize() <= 0
|
||||||
if ((file.getType() == TskData.TSK_DB_FILES_TYPE_ENUM.UNALLOC_BLOCKS)
|
|| (file.getType() == TskData.TSK_DB_FILES_TYPE_ENUM.UNALLOC_BLOCKS)
|
||||||
|| (file.getType() == TskData.TSK_DB_FILES_TYPE_ENUM.UNUSED_BLOCKS)) {
|
|| (file.getType() == TskData.TSK_DB_FILES_TYPE_ENUM.UNUSED_BLOCKS)) {
|
||||||
return MimeTypes.OCTET_STREAM;
|
return MimeTypes.OCTET_STREAM;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user