Skip to content
Snippets Groups Projects
Unverified Commit 7367392d authored by Ann Priestman's avatar Ann Priestman Committed by GitHub
Browse files

Merge pull request #2491 from APriestman/7810_rootDirTypeFix

7810 Ensure root directory is always TSK_FS_META_TYPE_DIR
parents c89d478d 5aaac6fd
Branches
No related tags found
No related merge requests found
......@@ -422,10 +422,11 @@ private long addBatchedFilesToDb() {
}
// We've seen a case where the root folder comes in with an undefined meta type.
// In that case, we alter the type to TSK_FS_META_TYPE_DIR so it will be cached
// properly and will not cause errors later for being an unexpected type.
// We've also seen a case where it comes in as a regular file. The root folder should always be
// a directory so it will be cached properly and will not cause errors later for
// being an unexpected type.
if ((fileInfo.parentObjId == fileInfo.fsObjId)
&& (fileInfo.metaType == TskData.TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_UNDEF.getValue())) {
&& (fileInfo.metaType != TskData.TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_DIR.getValue())) {
fileInfo.metaType = TskData.TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_DIR.getValue();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment