mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-17 18:17:43 +00:00
ingest progress bar: show more accurately which file is being ingested now
This commit is contained in:
parent
58ded3afa2
commit
c266b4fd41
@ -554,8 +554,6 @@ public class IngestManager {
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//image worker to remove itself when complete or interrupted
|
||||
void removeImageIngestWorker(IngestImageThread worker) {
|
||||
//remove worker
|
||||
@ -643,7 +641,7 @@ public class IngestManager {
|
||||
void enqueue(FsContent fsContent, IngestServiceFsContent service) {
|
||||
//fsContentUnits.put(fsContent, Collections.singletonList(service));
|
||||
List<IngestServiceFsContent> services = fsContentUnits.get(fsContent);
|
||||
if(services == null) {
|
||||
if (services == null) {
|
||||
services = new ArrayList<IngestServiceFsContent>();
|
||||
fsContentUnits.put(fsContent, services);
|
||||
}
|
||||
@ -653,7 +651,7 @@ public class IngestManager {
|
||||
void enqueue(FsContent fsContent, List<IngestServiceFsContent> services) {
|
||||
|
||||
List<IngestServiceFsContent> oldServices = fsContentUnits.get(fsContent);
|
||||
if(oldServices == null) {
|
||||
if (oldServices == null) {
|
||||
oldServices = new ArrayList<IngestServiceFsContent>();
|
||||
fsContentUnits.put(fsContent, oldServices);
|
||||
}
|
||||
@ -691,10 +689,11 @@ public class IngestManager {
|
||||
* @return true if the service is enqueued to do work
|
||||
*/
|
||||
boolean hasServiceEnqueued(IngestServiceFsContent service) {
|
||||
for(List<IngestServiceFsContent> list : fsContentUnits.values()) {
|
||||
if(list.contains(service))
|
||||
for (List<IngestServiceFsContent> list : fsContentUnits.values()) {
|
||||
if (list.contains(service)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -732,7 +731,7 @@ public class IngestManager {
|
||||
|
||||
void enqueue(Image image, IngestServiceImage service) {
|
||||
List<IngestServiceImage> services = imageUnits.get(image);
|
||||
if(services == null) {
|
||||
if (services == null) {
|
||||
services = new ArrayList<IngestServiceImage>();
|
||||
imageUnits.put(image, services);
|
||||
}
|
||||
@ -741,7 +740,7 @@ public class IngestManager {
|
||||
|
||||
void enqueue(Image image, List<IngestServiceImage> services) {
|
||||
List<IngestServiceImage> oldServices = imageUnits.get(image);
|
||||
if(oldServices == null) {
|
||||
if (oldServices == null) {
|
||||
oldServices = new ArrayList<IngestServiceImage>();
|
||||
imageUnits.put(image, oldServices);
|
||||
}
|
||||
@ -927,13 +926,16 @@ public class IngestManager {
|
||||
fsContentServiceResults.clear();
|
||||
}
|
||||
|
||||
final FsContent fileToProcess = unit.getKey();
|
||||
|
||||
for (IngestServiceFsContent service : unit.getValue()) {
|
||||
if (isCancelled()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
final FsContent fileToProcess = unit.getKey();
|
||||
if ( (fileToProcess.getMeta_flags() & TskData.TSK_FS_META_FLAG_ENUM.UNALLOC.getMetaFlag() ) != 0) {
|
||||
progress.progress(fileToProcess.getName(), processedFiles);
|
||||
|
||||
if ((fileToProcess.getMeta_flags() & TskData.TSK_FS_META_FLAG_ENUM.UNALLOC.getMetaFlag()) != 0) {
|
||||
//skip unallocated files, processing certain unalloc files may cause some modules to hang
|
||||
//TODO unallocated space and files are a future feature
|
||||
progress.progress(unit.getKey().getName(), ++processedFiles);
|
||||
@ -966,7 +968,7 @@ public class IngestManager {
|
||||
progress.switchToIndeterminate();
|
||||
progress.switchToDeterminate(numFsContents);
|
||||
}
|
||||
progress.progress(unit.getKey().getName(), ++processedFiles);
|
||||
progress.progress(fileToProcess.getName(), ++processedFiles);
|
||||
--numFsContents;
|
||||
} //end of this fsContent
|
||||
logger.log(Level.INFO, "Done background processing");
|
||||
@ -1011,7 +1013,6 @@ public class IngestManager {
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void handleInterruption() {
|
||||
for (IngestServiceFsContent s : fsContentServices) {
|
||||
s.stop();
|
||||
@ -1109,10 +1110,10 @@ public class IngestManager {
|
||||
//addImage((IngestServiceImage) service, image);
|
||||
break;
|
||||
case FsContent:
|
||||
if(fsContents == null) {
|
||||
if (fsContents == null) {
|
||||
long start = System.currentTimeMillis();
|
||||
fsContents = new GetAllFilesContentVisitor().visit(image);
|
||||
logger.info("Get all files took " + (System.currentTimeMillis()-start) + "ms");
|
||||
logger.info("Get all files took " + (System.currentTimeMillis() - start) + "ms");
|
||||
}
|
||||
//enqueue the same singleton fscontent service
|
||||
logger.log(Level.INFO, "Adding image " + image.getName() + " with " + fsContents.size() + " number of fsContent to service " + service.getName());
|
||||
@ -1123,9 +1124,10 @@ public class IngestManager {
|
||||
}
|
||||
progress.progress(serviceName + " " + imageName, ++processed);
|
||||
}
|
||||
if(fsContents != null)
|
||||
if (fsContents != null) {
|
||||
fsContents.clear();
|
||||
}
|
||||
}
|
||||
|
||||
//logger.log(Level.INFO, fsContentQueue.printQueue());
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user