mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-17 18:17:43 +00:00
Merge remote-tracking branch 'upstream/release-4.6.0' into 3258_DeleteHashDatabaseMessage
This commit is contained in:
commit
c83bbd832a
@ -29,6 +29,8 @@ import org.netbeans.swing.outline.Outline;
|
|||||||
import org.openide.nodes.Node;
|
import org.openide.nodes.Node;
|
||||||
import java.awt.EventQueue;
|
import java.awt.EventQueue;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.nio.file.LinkOption;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -207,28 +209,34 @@ class CaseBrowser extends javax.swing.JPanel implements ExplorerManager.Provider
|
|||||||
List<String> nodeList = CoordinationService.getInstance().getNodeList(CoordinationService.CategoryNode.CASES);
|
List<String> nodeList = CoordinationService.getInstance().getNodeList(CoordinationService.CategoryNode.CASES);
|
||||||
|
|
||||||
for (String node : nodeList) {
|
for (String node : nodeList) {
|
||||||
Path casePath = Paths.get(node);
|
Path casePath;
|
||||||
File caseFolder = casePath.toFile();
|
try {
|
||||||
if (caseFolder.exists()) {
|
casePath = Paths.get(node).toRealPath(LinkOption.NOFOLLOW_LINKS);
|
||||||
/*
|
|
||||||
* Search for '*.aut' files.
|
File caseFolder = casePath.toFile();
|
||||||
*/
|
if (caseFolder.exists()) {
|
||||||
File[] fileArray = caseFolder.listFiles();
|
/*
|
||||||
if (fileArray == null) {
|
* Search for '*.aut' files.
|
||||||
continue;
|
*/
|
||||||
}
|
File[] fileArray = caseFolder.listFiles();
|
||||||
String autFilePath = null;
|
if (fileArray == null) {
|
||||||
for (File file : fileArray) {
|
continue;
|
||||||
String name = file.getName().toLowerCase();
|
}
|
||||||
if (autFilePath == null && name.endsWith(".aut")) {
|
String autFilePath = null;
|
||||||
try {
|
for (File file : fileArray) {
|
||||||
caseList.add(new CaseMetadata(Paths.get(file.getAbsolutePath())));
|
String name = file.getName().toLowerCase();
|
||||||
} catch (CaseMetadata.CaseMetadataException ex) {
|
if (autFilePath == null && name.endsWith(".aut")) {
|
||||||
LOGGER.log(Level.SEVERE, String.format("Error reading case metadata file '%s'.", autFilePath), ex);
|
try {
|
||||||
|
caseList.add(new CaseMetadata(Paths.get(file.getAbsolutePath())));
|
||||||
|
} catch (CaseMetadata.CaseMetadataException ex) {
|
||||||
|
LOGGER.log(Level.SEVERE, String.format("Error reading case metadata file '%s'.", autFilePath), ex);
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (IOException ignore) {
|
||||||
|
//if a path could not be resolved to a real path do add it to the caseList
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return caseList;
|
return caseList;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user