mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-17 18:17:43 +00:00
fix keyword search timer reset - can't resuse the old timer object
This commit is contained in:
parent
06a9d47251
commit
20320eb2f4
@ -811,7 +811,12 @@ public final class KeywordSearchIngestModule implements IngestModuleAbstractFile
|
||||
|
||||
@Override
|
||||
protected Object doInBackground() throws Exception {
|
||||
logger.log(Level.INFO, "Pending start of new searcher");
|
||||
if (finalRun) {
|
||||
logger.log(Level.INFO, "Pending start of new (final) searcher");
|
||||
}
|
||||
else {
|
||||
logger.log(Level.INFO, "Pending start of new searcher");
|
||||
}
|
||||
|
||||
final String displayName = "Keyword Search" + (finalRun ? " - Finalizing" : "");
|
||||
progress = ProgressHandleFactory.createHandle(displayName + (" (Pending)"), new Cancellable() {
|
||||
@ -1082,7 +1087,10 @@ public final class KeywordSearchIngestModule implements IngestModuleAbstractFile
|
||||
} else {
|
||||
//start counting time for a new searcher to start
|
||||
//unless final searcher is pending
|
||||
if (finalSearcher != null) {
|
||||
if (finalSearcher == null) {
|
||||
//we need a new Timer object, because restarting previus will not cause firing of the action
|
||||
final int updateIntervalMs = KeywordSearchSettings.getUpdateFrequency().getTime() * 60 * 1000;
|
||||
searchTimer = new Timer(updateIntervalMs, new SearchTimerAction());
|
||||
searchTimer.start();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user