mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-08 14:19:32 +00:00
Fix to correctly determine non-ingestible content (needs latest bindings with equals() for Collections operations to work correctly)
This commit is contained in:
parent
9f402d6638
commit
d61b22acd5
@ -27,11 +27,10 @@ import java.awt.event.WindowAdapter;
|
|||||||
import java.awt.event.WindowEvent;
|
import java.awt.event.WindowEvent;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Comparator;
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.LinkedHashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.TreeSet;
|
|
||||||
import java.util.concurrent.ExecutionException;
|
import java.util.concurrent.ExecutionException;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
@ -112,17 +111,15 @@ public class IndexContentFilesAction extends AbstractAction {
|
|||||||
Collection<FsContent> ingestableFiles = c.accept(ingestableV);
|
Collection<FsContent> ingestableFiles = c.accept(ingestableV);
|
||||||
Collection<FsContent> allFiles = c.accept(allV);
|
Collection<FsContent> allFiles = c.accept(allV);
|
||||||
|
|
||||||
//calculate non ingestable Collection (complement of allFiles / ingestableFiles)
|
//calculate non ingestable Collection (complement of allFiles / ingestableFiles
|
||||||
Collection<FsContent> nonIngestibleFiles = new TreeSet<FsContent>(new Comparator<FsContent>() {
|
//TODO implement a facility that selects different categories of FsContent
|
||||||
|
Collection<FsContent> nonIngestibleFiles = new LinkedHashSet<FsContent>();
|
||||||
@Override
|
|
||||||
public int compare(FsContent fsc1, FsContent fsc2) {
|
|
||||||
return (int) (fsc1.getId() - fsc2.getId());
|
|
||||||
|
|
||||||
|
for (FsContent fs : allFiles) {
|
||||||
|
if (! ingestableFiles.contains(fs) ) {
|
||||||
|
nonIngestibleFiles.add(fs);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
|
||||||
nonIngestibleFiles.addAll(allFiles);
|
|
||||||
nonIngestibleFiles.removeAll(ingestableFiles);
|
|
||||||
|
|
||||||
// track number complete or with errors
|
// track number complete or with errors
|
||||||
problemFilesCount = 0;
|
problemFilesCount = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user