Skip to content
Snippets Groups Projects
Commit c42bf880 authored by apriestman's avatar apriestman
Browse files

Use external fs list on all paths

parent c914c0e4
Branches
No related tags found
No related merge requests found
...@@ -189,7 +189,7 @@ void ...@@ -189,7 +189,7 @@ void
* instead of opening a new copy. * instead of opening a new copy.
*/ */
void void
TskAuto::setExternalFileSystemList(std::list<TSK_FS_INFO *> fsInfoList) TskAuto::setExternalFileSystemList(const std::list<TSK_FS_INFO *>& fsInfoList)
{ {
m_exteralFsInfoList.resize(fsInfoList.size()); m_exteralFsInfoList.resize(fsInfoList.size());
m_exteralFsInfoList.assign(fsInfoList.begin(), fsInfoList.end()); m_exteralFsInfoList.assign(fsInfoList.begin(), fsInfoList.end());
...@@ -661,6 +661,18 @@ uint8_t ...@@ -661,6 +661,18 @@ uint8_t
return 1; return 1;
} }
// If we already have an open copy of this file system, use it
for (auto itr = m_exteralFsInfoList.begin(); itr != m_exteralFsInfoList.end(); itr++) {
if ((*itr)->offset == a_start) {
TSK_FS_INFO *fs_info = *itr;
TSK_RETVAL_ENUM retval = findFilesInFsInt(fs_info, fs_info->root_inum);
if (m_errors.empty() == false)
return TSK_ERR;
else
return retval;
}
}
TSK_FS_INFO *fs_info; TSK_FS_INFO *fs_info;
if ((fs_info = tsk_fs_open_img(m_img_info, a_start, a_ftype)) == NULL) { if ((fs_info = tsk_fs_open_img(m_img_info, a_start, a_ftype)) == NULL) {
if (isCurVsValid() == false) { if (isCurVsValid() == false) {
......
...@@ -100,7 +100,7 @@ class TskAuto { ...@@ -100,7 +100,7 @@ class TskAuto {
void setFileFilterFlags(TSK_FS_DIR_WALK_FLAG_ENUM); void setFileFilterFlags(TSK_FS_DIR_WALK_FLAG_ENUM);
void setVolFilterFlags(TSK_VS_PART_FLAG_ENUM); void setVolFilterFlags(TSK_VS_PART_FLAG_ENUM);
void setExternalFileSystemList(std::list<TSK_FS_INFO *> exteralFsInfoList); void setExternalFileSystemList(const std::list<TSK_FS_INFO *>& exteralFsInfoList);
/** /**
* TskAuto calls this method before it processes the volume system that is found in an * TskAuto calls this method before it processes the volume system that is found in an
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment