Skip to content
Snippets Groups Projects
Commit 63ae5be0 authored by Brian Carrier's avatar Brian Carrier
Browse files

Update directory name so that we can determine when we are hunting for orphan files

parent 69acc019
Branches
Tags
No related merge requests found
...@@ -722,11 +722,20 @@ TskAutoDb::processFile(TSK_FS_FILE * fs_file, const char *path) ...@@ -722,11 +722,20 @@ TskAutoDb::processFile(TSK_FS_FILE * fs_file, const char *path)
return TSK_STOP; return TSK_STOP;
} }
/* If no longer processing the same directory as the last file, /* Update the current directory, which can be used to show
* then update the class-level setting. */ * progress. If we get a directory, then use its name. We
int64_t cur = fs_file->name->par_addr; * do this so that when we are searching for orphan files, then
if (m_curDirId != cur) { * we at least show $OrphanFiles as status. The secondary check
m_curDirId = cur; * is to grab the parent folder from files once we return back
* into a folder when we are doing our depth-first recursion. */
if (isDir(fs_file)) {
m_curDirId = fs_file->name->meta_addr;
tsk_take_lock(&m_curDirPathLock);
m_curDirPath = string(path) + fs_file->name->name;
tsk_release_lock(&m_curDirPathLock);
}
else if (m_curDirId != fs_file->name->par_addr) {
m_curDirId = fs_file->name->par_addr;
tsk_take_lock(&m_curDirPathLock); tsk_take_lock(&m_curDirPathLock);
m_curDirPath = path; m_curDirPath = path;
tsk_release_lock(&m_curDirPathLock); tsk_release_lock(&m_curDirPathLock);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment