diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestJob.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestJob.java index d6725b8220..fe129c3528 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestJob.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestJob.java @@ -111,7 +111,7 @@ public final class IngestJob { boolean fileIngestIsRunning = false; Date fileIngestStartTime = null; for (DataSourceIngestJob.Snapshot snapshot : this.getDataSourceIngestJobSnapshots()) { - if (null != moduleHandle) { + if (null == moduleHandle) { DataSourceIngestPipeline.PipelineModule module = snapshot.getDataSourceLevelIngestModule(); if (null != module) { moduleHandle = new DataSourceIngestModuleHandle(this.dataSourceJobs.get(snapshot.getJobId()), module); @@ -257,6 +257,7 @@ public final class IngestJob { private final DataSourceIngestJob job; private final DataSourceIngestPipeline.PipelineModule module; + private final boolean cancelled; /** * Constructs a handle to a data source level ingest module that can be @@ -270,6 +271,7 @@ public final class IngestJob { private DataSourceIngestModuleHandle(DataSourceIngestJob job, DataSourceIngestPipeline.PipelineModule module) { this.job = job; this.module = module; + this.cancelled = job.currentDataSourceIngestModuleIsCancelled(); } /** @@ -283,7 +285,7 @@ public final class IngestJob { } /** - * Returns the time the data source level ingest module associated with + * Gets the time the data source level ingest module associated with * this handle began processing. * * @return The module processing start time. @@ -292,6 +294,16 @@ public final class IngestJob { return this.module.getProcessingStartTime(); } + /** + * Queries whether or not cancellation of the data source level ingest + * module associated with this handle has been requested. + * + * @return True or false. + */ + public boolean isCancelled() { + return this.cancelled; + } + /** * Requests cancellation of the ingest module associated with this * handle. Returns immediately, but there may be a delay before the