mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
Fix count refresh issue
This commit is contained in:
parent
8340ee6a72
commit
01ef4cb2f8
@ -67,6 +67,7 @@ import org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepository;
|
||||
import org.sleuthkit.autopsy.coreutils.TimeZoneUtils;
|
||||
import org.sleuthkit.autopsy.texttranslation.utils.FileNameTranslationUtil;
|
||||
import org.sleuthkit.datamodel.Score;
|
||||
import org.sleuthkit.datamodel.VirtualDirectory;
|
||||
|
||||
/**
|
||||
* An abstract node that encapsulates AbstractFile data
|
||||
@ -95,6 +96,11 @@ public abstract class AbstractAbstractFileNode<T extends AbstractFile> extends A
|
||||
IngestManager.getInstance().addIngestModuleEventListener(INGEST_MODULE_EVENTS_OF_INTEREST, weakPcl);
|
||||
}
|
||||
}
|
||||
|
||||
// Add listener if this is the carved files base directory.
|
||||
if (VirtualDirectory.NAME_CARVED.equals(abstractFile.getName())) {
|
||||
IngestManager.getInstance().addIngestModuleEventListener(INGEST_MODULE_EVENTS_OF_INTEREST, weakPcl);
|
||||
}
|
||||
|
||||
try {
|
||||
//See JIRA-5971
|
||||
@ -158,7 +164,13 @@ public abstract class AbstractAbstractFileNode<T extends AbstractFile> extends A
|
||||
// data sources branch of the tree. The parent nodes in other
|
||||
// branches of the tree (e.g. File Types and Deleted Files) do
|
||||
// not need to be refreshed.
|
||||
BaseChildFactory.post(getParentNode().getName(), new RefreshKeysEvent());
|
||||
if (VirtualDirectory.NAME_CARVED.equals(getContent().getName())) {
|
||||
// If the current node is the carved files directory, we need to refresh it
|
||||
BaseChildFactory.post(getName(), new RefreshKeysEvent());
|
||||
} else {
|
||||
// Otherwise we need to refresh the parent node
|
||||
BaseChildFactory.post(getParentNode().getName(), new RefreshKeysEvent());
|
||||
}
|
||||
} catch (NullPointerException ex) {
|
||||
// Skip
|
||||
} catch (NoSuchEventBusException ex) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user