mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-12 16:06:15 +00:00
Merge pull request #4071 from eugene7646/input_scan_time_fix
Input scan time fix
This commit is contained in:
commit
b6ddd6e39b
@ -1398,10 +1398,6 @@ final class AutoIngestManager extends Observable implements PropertyChangeListen
|
||||
AutoIngestJob job;
|
||||
if (nodeData.getVersion() == AutoIngestJobNodeData.getCurrentVersion()) {
|
||||
job = new AutoIngestJob(nodeData);
|
||||
Path caseDirectory = PathUtils.findCaseDirectory(rootOutputDirectory, manifest.getCaseName());
|
||||
if (null != caseDirectory) {
|
||||
job.setCaseDirectoryPath(caseDirectory);
|
||||
}
|
||||
} else {
|
||||
job = new AutoIngestJob(manifest);
|
||||
job.setPriority(nodeData.getPriority()); // Retain priority, present in all versions of the node data.
|
||||
@ -1431,10 +1427,6 @@ final class AutoIngestManager extends Observable implements PropertyChangeListen
|
||||
sysLogger.log(Level.SEVERE, String.format("Error attempting to set node data for %s", manifest.getFilePath()), ex);
|
||||
}
|
||||
}
|
||||
Path caseDirectory = PathUtils.findCaseDirectory(rootOutputDirectory, manifest.getCaseName());
|
||||
if (null != caseDirectory) {
|
||||
job.setCaseDirectoryPath(caseDirectory);
|
||||
}
|
||||
newPendingJobsList.add(job);
|
||||
}
|
||||
|
||||
@ -1595,26 +1587,29 @@ final class AutoIngestManager extends Observable implements PropertyChangeListen
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
private void addCompletedJob(Manifest manifest, AutoIngestJobNodeData nodeData) throws CoordinationServiceException, InterruptedException, AutoIngestJobException {
|
||||
Path caseDirectoryPath = PathUtils.findCaseDirectory(rootOutputDirectory, manifest.getCaseName());
|
||||
if (null != caseDirectoryPath) {
|
||||
Path caseDirectoryPath = nodeData.getCaseDirectoryPath();
|
||||
if (!caseDirectoryPath.toFile().exists()) {
|
||||
sysLogger.log(Level.WARNING, String.format("Job completed for %s, but cannot find case directory %s, ignoring job", nodeData.getManifestFilePath(), caseDirectoryPath.toString()));
|
||||
return;
|
||||
}
|
||||
|
||||
AutoIngestJob job;
|
||||
if (nodeData.getVersion() == AutoIngestJobNodeData.getCurrentVersion()) {
|
||||
job = new AutoIngestJob(nodeData);
|
||||
job.setCaseDirectoryPath(caseDirectoryPath);
|
||||
} else {
|
||||
/**
|
||||
* Use the manifest rather than the node data here to create
|
||||
* a new AutoIngestJob instance because the AutoIngestJob
|
||||
* constructor that takes a node data object expects the
|
||||
* node data to have fields that do not exist in earlier
|
||||
* versions.
|
||||
* Use the manifest rather than the node data here to create a
|
||||
* new AutoIngestJob instance because the AutoIngestJob
|
||||
* constructor that takes a node data object expects the node
|
||||
* data to have fields that do not exist in earlier versions.
|
||||
*/
|
||||
job = new AutoIngestJob(manifest);
|
||||
job.setCaseDirectoryPath(caseDirectoryPath);
|
||||
|
||||
/**
|
||||
* Update the job with the fields that exist in all versions
|
||||
* of the nodeData.
|
||||
* Update the job with the fields that exist in all versions of
|
||||
* the nodeData.
|
||||
*/
|
||||
job.setCompletedDate(nodeData.getCompletedDate());
|
||||
job.setErrorsOccurred(nodeData.getErrorsOccurred());
|
||||
@ -1639,10 +1634,6 @@ final class AutoIngestManager extends Observable implements PropertyChangeListen
|
||||
}
|
||||
}
|
||||
newCompletedJobsList.add(job);
|
||||
|
||||
} else {
|
||||
sysLogger.log(Level.WARNING, String.format("Job completed for %s, but cannot find case directory, ignoring job", nodeData.getManifestFilePath()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2456,6 +2447,7 @@ final class AutoIngestManager extends Observable implements PropertyChangeListen
|
||||
Thread.sleep(AutoIngestUserPreferences.getSecondsToSleepBetweenCases() * 1000);
|
||||
}
|
||||
currentJob.setCaseDirectoryPath(caseDirectoryPath);
|
||||
updateCoordinationServiceManifestNode(currentJob); // update case directory path
|
||||
Case caseForJob = Case.getCurrentCase();
|
||||
sysLogger.log(Level.INFO, "Opened case {0} for {1}", new Object[]{caseForJob.getName(), manifest.getFilePath()});
|
||||
return caseForJob;
|
||||
|
Loading…
x
Reference in New Issue
Block a user