mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-12 07:56:16 +00:00
updates for ignoring placeholder paths
This commit is contained in:
parent
9e4c0b9801
commit
2de8646ba7
@ -194,6 +194,8 @@ public class Case {
|
|||||||
private final SleuthkitEventListener sleuthkitEventListener;
|
private final SleuthkitEventListener sleuthkitEventListener;
|
||||||
private CollaborationMonitor collaborationMonitor;
|
private CollaborationMonitor collaborationMonitor;
|
||||||
private Services caseServices;
|
private Services caseServices;
|
||||||
|
// matches something like '\\.\PHYSICALDRIVE0'
|
||||||
|
private static final String PLACEHOLDER_DS_PATH_REGEX = "^\\s*\\\\\\\\\\.\\\\(PHYSICALDRIVE)\\d*\\s*$";
|
||||||
|
|
||||||
private volatile boolean hasDataSource = false;
|
private volatile boolean hasDataSource = false;
|
||||||
private volatile boolean hasData = false;
|
private volatile boolean hasData = false;
|
||||||
@ -1305,6 +1307,13 @@ public class Case {
|
|||||||
String path = entry.getValue();
|
String path = entry.getValue();
|
||||||
boolean fileExists = (new File(path).isFile() || DriveUtils.driveExists(path));
|
boolean fileExists = (new File(path).isFile() || DriveUtils.driveExists(path));
|
||||||
if (!fileExists) {
|
if (!fileExists) {
|
||||||
|
// CT-7336: ignore relocating datasources if file provider is present and placeholder path is used.
|
||||||
|
if (newCurrentCase.getMetadata() != null
|
||||||
|
&& !StringUtils.isBlank(newCurrentCase.getMetadata().getContentProviderName())
|
||||||
|
&& (path == null || path.matches(PLACEHOLDER_DS_PATH_REGEX))) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Using invokeAndWait means that the dialog will
|
// Using invokeAndWait means that the dialog will
|
||||||
// open on the EDT but this thread will wait for an
|
// open on the EDT but this thread will wait for an
|
||||||
|
Loading…
x
Reference in New Issue
Block a user