From 4cbec0d2726d1322d953c1122418df4931479627 Mon Sep 17 00:00:00 2001 From: momo Date: Mon, 9 Nov 2015 16:30:05 -0500 Subject: [PATCH 1/5] only file ingest if directory --- .../DirectoryTreeFilterNode.java | 6 ++-- .../autopsy/ingest/IngestJobSettings.java | 29 +++++++++++++++-- .../ingest/RunIngestModulesDialog.java | 32 ++++++++++++++++++- 3 files changed, 61 insertions(+), 6 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/directorytree/DirectoryTreeFilterNode.java b/Core/src/org/sleuthkit/autopsy/directorytree/DirectoryTreeFilterNode.java index 4f6e1f0eec..ff4d3d8b2c 100755 --- a/Core/src/org/sleuthkit/autopsy/directorytree/DirectoryTreeFilterNode.java +++ b/Core/src/org/sleuthkit/autopsy/directorytree/DirectoryTreeFilterNode.java @@ -123,15 +123,15 @@ class DirectoryTreeFilterNode extends FilterNode { } // 'run ingest' action and 'file search' action are added only if the - // selected node is img node or a root level virtual directory. - if (img != null || isRootVD) { + // selected node is img node or a root level virtual directory or a directory. + if (img != null || isRootVD || dir !=null) { actions.add(new FileSearchAction( NbBundle.getMessage(this.getClass(), "DirectoryTreeFilterNode.action.openFileSrcByAttr.text"))); actions.add(new AbstractAction( NbBundle.getMessage(this.getClass(), "DirectoryTreeFilterNode.action.runIngestMods.text")) { @Override public void actionPerformed(ActionEvent e) { - final RunIngestModulesDialog ingestDialog = new RunIngestModulesDialog(Collections.singletonList(content)); + final RunIngestModulesDialog ingestDialog = new RunIngestModulesDialog(Collections.singletonList(content), dir != null); ingestDialog.display(); } }); diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestJobSettings.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestJobSettings.java index d31c0da8c7..2997f90754 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestJobSettings.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestJobSettings.java @@ -58,6 +58,7 @@ public class IngestJobSettings { private final List moduleTemplates; private boolean processUnallocatedSpace; private final List warnings; + private final boolean isDir; /** * Constructs an ingest job settings object for a given context. @@ -69,6 +70,23 @@ public class IngestJobSettings { this.moduleTemplates = new ArrayList<>(); this.processUnallocatedSpace = Boolean.parseBoolean(IngestJobSettings.PROCESS_UNALLOC_SPACE_DEFAULT); this.warnings = new ArrayList<>(); + this.isDir = false; + this.createSavedModuleSettingsFolder(); + this.load(); + } + + /** + * Constructs an ingest job settings object for a given context. + * + * @param context The context identifier string. + * @param isDir Whether the dataSources are directories + */ + public IngestJobSettings(String context, boolean isDir) { + this.context = context; + this.moduleTemplates = new ArrayList<>(); + this.processUnallocatedSpace = Boolean.parseBoolean(IngestJobSettings.PROCESS_UNALLOC_SPACE_DEFAULT); + this.warnings = new ArrayList<>(); + this.isDir = isDir; this.createSavedModuleSettingsFolder(); this.load(); } @@ -178,8 +196,15 @@ public class IngestJobSettings { * Get the ingest module factories discovered by the ingest module * loader. */ - List moduleFactories = IngestModuleFactoryLoader.getIngestModuleFactories(); - HashSet loadedModuleNames = new HashSet<>(); + List moduleFactories = new ArrayList<>(); + List tempModuleFactories = IngestModuleFactoryLoader.getIngestModuleFactories(); + HashSet loadedModuleNames = new HashSet<>(); + + for(IngestModuleFactory moduleFactory : tempModuleFactories) { + if(!isDir || moduleFactory.isFileIngestModuleFactory()) + moduleFactories.add(moduleFactory); + } + for (IngestModuleFactory moduleFactory : moduleFactories) { loadedModuleNames.add(moduleFactory.getModuleDisplayName()); } diff --git a/Core/src/org/sleuthkit/autopsy/ingest/RunIngestModulesDialog.java b/Core/src/org/sleuthkit/autopsy/ingest/RunIngestModulesDialog.java index da491fd22a..88bdf182cb 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/RunIngestModulesDialog.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/RunIngestModulesDialog.java @@ -43,6 +43,7 @@ import org.sleuthkit.datamodel.Content; public final class RunIngestModulesDialog extends JDialog { private static final String TITLE = NbBundle.getMessage(RunIngestModulesDialog.class, "IngestDialog.title.text"); + private final boolean isDir; private static Dimension DIMENSIONS = new Dimension(500, 300); private final List dataSources = new ArrayList<>(); private IngestJobSettingsPanel ingestJobSettingsPanel; @@ -59,6 +60,23 @@ public final class RunIngestModulesDialog extends JDialog { public RunIngestModulesDialog(JFrame frame, String title, boolean modal, List dataSources) { super(frame, title, modal); this.dataSources.addAll(dataSources); + this.isDir = false; + } + + /** + * Construct a dialog box that allows a user to configure and run an ingest + * job on one or more data sources. + * + * @param frame The dialog parent window. + * @param title The title for the dialog. + * @param modal True if the dialog should be modal, false otherwise. + * @param dataSources The data sources to be processed. + * @param isDir Whether the data sources are directories + */ + public RunIngestModulesDialog(JFrame frame, String title, boolean modal, List dataSources, boolean isDir) { + super(frame, title, modal); + this.dataSources.addAll(dataSources); + this.isDir = isDir; } /** @@ -70,6 +88,17 @@ public final class RunIngestModulesDialog extends JDialog { public RunIngestModulesDialog(List dataSources) { this(new JFrame(TITLE), TITLE, true, dataSources); } + + /** + * Construct a dialog box that allows a user to configure and run an ingest + * job on one or more data sources. + * + * @param dataSources The data sources to be processed. + * @param isDir Whether the data sources are directories + */ + public RunIngestModulesDialog(List dataSources, boolean isDir) { + this(new JFrame(TITLE), TITLE, true, dataSources, isDir); + } /** * Construct a dialog box that allows a user to configure and run an ingest @@ -84,6 +113,7 @@ public final class RunIngestModulesDialog extends JDialog { @Deprecated public RunIngestModulesDialog(JFrame frame, String title, boolean modal) { super(frame, title, modal); + this.isDir = false; } /** @@ -129,7 +159,7 @@ public final class RunIngestModulesDialog extends JDialog { * Get the default or saved ingest job settings for this context and use * them to create and add an ingest job settings panel. */ - IngestJobSettings ingestJobSettings = new IngestJobSettings(RunIngestModulesDialog.class.getCanonicalName()); + IngestJobSettings ingestJobSettings = new IngestJobSettings(RunIngestModulesDialog.class.getCanonicalName(), isDir); RunIngestModulesDialog.showWarnings(ingestJobSettings); this.ingestJobSettingsPanel = new IngestJobSettingsPanel(ingestJobSettings); add(this.ingestJobSettingsPanel, BorderLayout.PAGE_START); From 6cefe96ca157c471d2d02d2eb9879bde0e7b1055 Mon Sep 17 00:00:00 2001 From: momo Date: Tue, 10 Nov 2015 11:20:17 -0500 Subject: [PATCH 2/5] remove flag, use context --- .../DirectoryTreeFilterNode.java | 12 +++++- .../autopsy/ingest/IngestJobSettings.java | 20 +--------- .../ingest/RunIngestModulesDialog.java | 37 ++++--------------- 3 files changed, 19 insertions(+), 50 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/directorytree/DirectoryTreeFilterNode.java b/Core/src/org/sleuthkit/autopsy/directorytree/DirectoryTreeFilterNode.java index ff4d3d8b2c..04887603a9 100755 --- a/Core/src/org/sleuthkit/autopsy/directorytree/DirectoryTreeFilterNode.java +++ b/Core/src/org/sleuthkit/autopsy/directorytree/DirectoryTreeFilterNode.java @@ -105,6 +105,14 @@ class DirectoryTreeFilterNode extends FilterNode { Directory dir = this.getLookup().lookup(Directory.class); if (dir != null) { actions.add(ExtractAction.getInstance()); + actions.add(new AbstractAction( + NbBundle.getMessage(this.getClass(), "DirectoryTreeFilterNode.action.runIngestMods.text")) { + @Override + public void actionPerformed(ActionEvent e) { + final RunIngestModulesDialog ingestDialog = new RunIngestModulesDialog(dir); + ingestDialog.display(); + } + }); } final Image img = this.getLookup().lookup(Image.class); @@ -124,14 +132,14 @@ class DirectoryTreeFilterNode extends FilterNode { // 'run ingest' action and 'file search' action are added only if the // selected node is img node or a root level virtual directory or a directory. - if (img != null || isRootVD || dir !=null) { + if (img != null || isRootVD) { actions.add(new FileSearchAction( NbBundle.getMessage(this.getClass(), "DirectoryTreeFilterNode.action.openFileSrcByAttr.text"))); actions.add(new AbstractAction( NbBundle.getMessage(this.getClass(), "DirectoryTreeFilterNode.action.runIngestMods.text")) { @Override public void actionPerformed(ActionEvent e) { - final RunIngestModulesDialog ingestDialog = new RunIngestModulesDialog(Collections.singletonList(content), dir != null); + final RunIngestModulesDialog ingestDialog = new RunIngestModulesDialog(Collections.singletonList(content)); ingestDialog.display(); } }); diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestJobSettings.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestJobSettings.java index 2997f90754..fc56739cb3 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestJobSettings.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestJobSettings.java @@ -58,7 +58,6 @@ public class IngestJobSettings { private final List moduleTemplates; private boolean processUnallocatedSpace; private final List warnings; - private final boolean isDir; /** * Constructs an ingest job settings object for a given context. @@ -70,23 +69,6 @@ public class IngestJobSettings { this.moduleTemplates = new ArrayList<>(); this.processUnallocatedSpace = Boolean.parseBoolean(IngestJobSettings.PROCESS_UNALLOC_SPACE_DEFAULT); this.warnings = new ArrayList<>(); - this.isDir = false; - this.createSavedModuleSettingsFolder(); - this.load(); - } - - /** - * Constructs an ingest job settings object for a given context. - * - * @param context The context identifier string. - * @param isDir Whether the dataSources are directories - */ - public IngestJobSettings(String context, boolean isDir) { - this.context = context; - this.moduleTemplates = new ArrayList<>(); - this.processUnallocatedSpace = Boolean.parseBoolean(IngestJobSettings.PROCESS_UNALLOC_SPACE_DEFAULT); - this.warnings = new ArrayList<>(); - this.isDir = isDir; this.createSavedModuleSettingsFolder(); this.load(); } @@ -201,7 +183,7 @@ public class IngestJobSettings { HashSet loadedModuleNames = new HashSet<>(); for(IngestModuleFactory moduleFactory : tempModuleFactories) { - if(!isDir || moduleFactory.isFileIngestModuleFactory()) + if(!context.endsWith(".isDir") || moduleFactory.isFileIngestModuleFactory()) moduleFactories.add(moduleFactory); } diff --git a/Core/src/org/sleuthkit/autopsy/ingest/RunIngestModulesDialog.java b/Core/src/org/sleuthkit/autopsy/ingest/RunIngestModulesDialog.java index 88bdf182cb..29e6cfe79e 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/RunIngestModulesDialog.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/RunIngestModulesDialog.java @@ -35,6 +35,7 @@ import javax.swing.JOptionPane; import javax.swing.JPanel; import org.openide.util.NbBundle; import org.sleuthkit.datamodel.Content; +import org.sleuthkit.datamodel.Directory; /** * Dialog box that allows a user to configure and run an ingest job on one or @@ -43,7 +44,7 @@ import org.sleuthkit.datamodel.Content; public final class RunIngestModulesDialog extends JDialog { private static final String TITLE = NbBundle.getMessage(RunIngestModulesDialog.class, "IngestDialog.title.text"); - private final boolean isDir; + private final String context; private static Dimension DIMENSIONS = new Dimension(500, 300); private final List dataSources = new ArrayList<>(); private IngestJobSettingsPanel ingestJobSettingsPanel; @@ -60,23 +61,7 @@ public final class RunIngestModulesDialog extends JDialog { public RunIngestModulesDialog(JFrame frame, String title, boolean modal, List dataSources) { super(frame, title, modal); this.dataSources.addAll(dataSources); - this.isDir = false; - } - - /** - * Construct a dialog box that allows a user to configure and run an ingest - * job on one or more data sources. - * - * @param frame The dialog parent window. - * @param title The title for the dialog. - * @param modal True if the dialog should be modal, false otherwise. - * @param dataSources The data sources to be processed. - * @param isDir Whether the data sources are directories - */ - public RunIngestModulesDialog(JFrame frame, String title, boolean modal, List dataSources, boolean isDir) { - super(frame, title, modal); - this.dataSources.addAll(dataSources); - this.isDir = isDir; + this.context = RunIngestModulesDialog.class.getCanonicalName(); } /** @@ -89,15 +74,9 @@ public final class RunIngestModulesDialog extends JDialog { this(new JFrame(TITLE), TITLE, true, dataSources); } - /** - * Construct a dialog box that allows a user to configure and run an ingest - * job on one or more data sources. - * - * @param dataSources The data sources to be processed. - * @param isDir Whether the data sources are directories - */ - public RunIngestModulesDialog(List dataSources, boolean isDir) { - this(new JFrame(TITLE), TITLE, true, dataSources, isDir); + public RunIngestModulesDialog(Directory dir) { + this.dataSources.add(dir); + this.context = RunIngestModulesDialog.class.getCanonicalName() + ".isDir"; } /** @@ -113,7 +92,7 @@ public final class RunIngestModulesDialog extends JDialog { @Deprecated public RunIngestModulesDialog(JFrame frame, String title, boolean modal) { super(frame, title, modal); - this.isDir = false; + this.context = RunIngestModulesDialog.class.getCanonicalName(); } /** @@ -159,7 +138,7 @@ public final class RunIngestModulesDialog extends JDialog { * Get the default or saved ingest job settings for this context and use * them to create and add an ingest job settings panel. */ - IngestJobSettings ingestJobSettings = new IngestJobSettings(RunIngestModulesDialog.class.getCanonicalName(), isDir); + IngestJobSettings ingestJobSettings = new IngestJobSettings(context); RunIngestModulesDialog.showWarnings(ingestJobSettings); this.ingestJobSettingsPanel = new IngestJobSettingsPanel(ingestJobSettings); add(this.ingestJobSettingsPanel, BorderLayout.PAGE_START); From 1abc5e7180963d4c4ed0a3fd6353a8dd189cbf5e Mon Sep 17 00:00:00 2001 From: momo Date: Tue, 10 Nov 2015 11:21:21 -0500 Subject: [PATCH 3/5] fix comment --- .../autopsy/directorytree/DirectoryTreeFilterNode.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/src/org/sleuthkit/autopsy/directorytree/DirectoryTreeFilterNode.java b/Core/src/org/sleuthkit/autopsy/directorytree/DirectoryTreeFilterNode.java index 04887603a9..a25f7c819e 100755 --- a/Core/src/org/sleuthkit/autopsy/directorytree/DirectoryTreeFilterNode.java +++ b/Core/src/org/sleuthkit/autopsy/directorytree/DirectoryTreeFilterNode.java @@ -131,7 +131,7 @@ class DirectoryTreeFilterNode extends FilterNode { } // 'run ingest' action and 'file search' action are added only if the - // selected node is img node or a root level virtual directory or a directory. + // selected node is img node or a root level virtual directory. if (img != null || isRootVD) { actions.add(new FileSearchAction( NbBundle.getMessage(this.getClass(), "DirectoryTreeFilterNode.action.openFileSrcByAttr.text"))); From f2db8bf0b802b47c71c93024f320f04333df3c15 Mon Sep 17 00:00:00 2001 From: momo Date: Thu, 12 Nov 2015 13:07:46 -0500 Subject: [PATCH 4/5] new design --- .../autopsy/ingest/IngestJobSettings.java | 55 ++++++++++++++++--- .../ingest/RunIngestModulesDialog.java | 11 ++-- 2 files changed, 54 insertions(+), 12 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestJobSettings.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestJobSettings.java index fc56739cb3..9f9e6feab5 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestJobSettings.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestJobSettings.java @@ -53,12 +53,24 @@ public class IngestJobSettings { private static final String MODULE_SETTINGS_FILE_EXT = ".settings"; //NON-NLS private static final Logger logger = Logger.getLogger(IngestJobSettings.class.getName()); private final String context; + private final IngestType ingestType; private String moduleSettingsFolderPath; private static final CharSequence pythonModuleSettingsPrefixCS = "org.python.proxies.".subSequence(0, "org.python.proxies.".length() - 1); private final List moduleTemplates; private boolean processUnallocatedSpace; private final List warnings; + // Determines which modeules to run + public enum IngestType { + + // Run all modules + ALL_MODULES, + // Run only data source modules + DATA_SOURCE_ONLY, + // Run only files modules + FILES_ONLY + } + /** * Constructs an ingest job settings object for a given context. * @@ -66,6 +78,29 @@ public class IngestJobSettings { */ public IngestJobSettings(String context) { this.context = context; + this.ingestType = IngestType.ALL_MODULES; + this.moduleTemplates = new ArrayList<>(); + this.processUnallocatedSpace = Boolean.parseBoolean(IngestJobSettings.PROCESS_UNALLOC_SPACE_DEFAULT); + this.warnings = new ArrayList<>(); + this.createSavedModuleSettingsFolder(); + this.load(); + } + + /** + * Constructs an ingest job settings object for a given context. + * + * @param context The context identifier string. + * @param ingestType The type of modules ingest is running. + */ + public IngestJobSettings(String context, IngestType ingestType) { + this.ingestType = ingestType; + + if (!this.ingestType.equals(IngestType.ALL_MODULES)) { + this.context = context + this.ingestType.name(); + } else { + this.context = context; + } + this.moduleTemplates = new ArrayList<>(); this.processUnallocatedSpace = Boolean.parseBoolean(IngestJobSettings.PROCESS_UNALLOC_SPACE_DEFAULT); this.warnings = new ArrayList<>(); @@ -145,10 +180,10 @@ public class IngestJobSettings { void setProcessUnallocatedSpace(boolean processUnallocatedSpace) { this.processUnallocatedSpace = processUnallocatedSpace; } - + /** * Returns the path to the ingest module settings folder. - * + * * @return path to the module settings folder */ public Path getSavedModuleSettingsFolder(){ @@ -180,13 +215,19 @@ public class IngestJobSettings { */ List moduleFactories = new ArrayList<>(); List tempModuleFactories = IngestModuleFactoryLoader.getIngestModuleFactories(); - HashSet loadedModuleNames = new HashSet<>(); - - for(IngestModuleFactory moduleFactory : tempModuleFactories) { - if(!context.endsWith(".isDir") || moduleFactory.isFileIngestModuleFactory()) + HashSet loadedModuleNames = new HashSet<>(); + + // Add modules that are going to be used for this ingest depending on type. + for (IngestModuleFactory moduleFactory : tempModuleFactories) { + if (this.ingestType.equals(IngestType.ALL_MODULES)) { moduleFactories.add(moduleFactory); + } else if (this.ingestType.equals(IngestType.DATA_SOURCE_ONLY) && moduleFactory.isDataSourceIngestModuleFactory()) { + moduleFactories.add(moduleFactory); + } else if (this.ingestType.equals(IngestType.FILES_ONLY) && moduleFactory.isFileIngestModuleFactory()) { + moduleFactories.add(moduleFactory); + } } - + for (IngestModuleFactory moduleFactory : moduleFactories) { loadedModuleNames.add(moduleFactory.getModuleDisplayName()); } diff --git a/Core/src/org/sleuthkit/autopsy/ingest/RunIngestModulesDialog.java b/Core/src/org/sleuthkit/autopsy/ingest/RunIngestModulesDialog.java index 29e6cfe79e..27b7f3ecf5 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/RunIngestModulesDialog.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/RunIngestModulesDialog.java @@ -34,6 +34,7 @@ import javax.swing.JFrame; import javax.swing.JOptionPane; import javax.swing.JPanel; import org.openide.util.NbBundle; +import org.sleuthkit.autopsy.ingest.IngestJobSettings.IngestType; import org.sleuthkit.datamodel.Content; import org.sleuthkit.datamodel.Directory; @@ -44,7 +45,7 @@ import org.sleuthkit.datamodel.Directory; public final class RunIngestModulesDialog extends JDialog { private static final String TITLE = NbBundle.getMessage(RunIngestModulesDialog.class, "IngestDialog.title.text"); - private final String context; + private final IngestType ingestType; private static Dimension DIMENSIONS = new Dimension(500, 300); private final List dataSources = new ArrayList<>(); private IngestJobSettingsPanel ingestJobSettingsPanel; @@ -61,7 +62,7 @@ public final class RunIngestModulesDialog extends JDialog { public RunIngestModulesDialog(JFrame frame, String title, boolean modal, List dataSources) { super(frame, title, modal); this.dataSources.addAll(dataSources); - this.context = RunIngestModulesDialog.class.getCanonicalName(); + this.ingestType = IngestType.ALL_MODULES; } /** @@ -76,7 +77,7 @@ public final class RunIngestModulesDialog extends JDialog { public RunIngestModulesDialog(Directory dir) { this.dataSources.add(dir); - this.context = RunIngestModulesDialog.class.getCanonicalName() + ".isDir"; + this.ingestType = IngestType.FILES_ONLY; } /** @@ -92,7 +93,7 @@ public final class RunIngestModulesDialog extends JDialog { @Deprecated public RunIngestModulesDialog(JFrame frame, String title, boolean modal) { super(frame, title, modal); - this.context = RunIngestModulesDialog.class.getCanonicalName(); + this.ingestType = IngestType.ALL_MODULES; } /** @@ -138,7 +139,7 @@ public final class RunIngestModulesDialog extends JDialog { * Get the default or saved ingest job settings for this context and use * them to create and add an ingest job settings panel. */ - IngestJobSettings ingestJobSettings = new IngestJobSettings(context); + IngestJobSettings ingestJobSettings = new IngestJobSettings(RunIngestModulesDialog.class.getCanonicalName(), this.ingestType); RunIngestModulesDialog.showWarnings(ingestJobSettings); this.ingestJobSettingsPanel = new IngestJobSettingsPanel(ingestJobSettings); add(this.ingestJobSettingsPanel, BorderLayout.PAGE_START); From d0f1d3c3bfb8039843963397d60d60fe0de90823 Mon Sep 17 00:00:00 2001 From: momo Date: Thu, 12 Nov 2015 13:27:38 -0500 Subject: [PATCH 5/5] some refactoring; --- .../directorytree/DirectoryTreeTopComponent.java | 2 -- .../sleuthkit/autopsy/ingest/IngestJobSettings.java | 10 +++++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/directorytree/DirectoryTreeTopComponent.java b/Core/src/org/sleuthkit/autopsy/directorytree/DirectoryTreeTopComponent.java index da49e1546f..4359121310 100644 --- a/Core/src/org/sleuthkit/autopsy/directorytree/DirectoryTreeTopComponent.java +++ b/Core/src/org/sleuthkit/autopsy/directorytree/DirectoryTreeTopComponent.java @@ -619,8 +619,6 @@ public final class DirectoryTreeTopComponent extends TopComponent implements Dat DirectoryTreeTopComponent.this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); try { - // make sure dataResult is open, redundant? - //dataResult.open(); Node treeNode = DirectoryTreeTopComponent.this.getSelectedNode(); if (treeNode != null) { DirectoryTreeFilterNode.OriginalNode origin = treeNode.getLookup().lookup(DirectoryTreeFilterNode.OriginalNode.class); diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestJobSettings.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestJobSettings.java index 9f9e6feab5..75af39f49a 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestJobSettings.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestJobSettings.java @@ -95,10 +95,10 @@ public class IngestJobSettings { public IngestJobSettings(String context, IngestType ingestType) { this.ingestType = ingestType; - if (!this.ingestType.equals(IngestType.ALL_MODULES)) { - this.context = context + this.ingestType.name(); - } else { + if (this.ingestType.equals(IngestType.ALL_MODULES)) { this.context = context; + } else { + this.context = context + "." + this.ingestType.name(); } this.moduleTemplates = new ArrayList<>(); @@ -214,11 +214,11 @@ public class IngestJobSettings { * loader. */ List moduleFactories = new ArrayList<>(); - List tempModuleFactories = IngestModuleFactoryLoader.getIngestModuleFactories(); + List allModuleFactories = IngestModuleFactoryLoader.getIngestModuleFactories(); HashSet loadedModuleNames = new HashSet<>(); // Add modules that are going to be used for this ingest depending on type. - for (IngestModuleFactory moduleFactory : tempModuleFactories) { + for (IngestModuleFactory moduleFactory : allModuleFactories) { if (this.ingestType.equals(IngestType.ALL_MODULES)) { moduleFactories.add(moduleFactory); } else if (this.ingestType.equals(IngestType.DATA_SOURCE_ONLY) && moduleFactory.isDataSourceIngestModuleFactory()) {