Skip to content

Commit

Permalink
fix #323: fix opening carved files if folder datasource is moved
Browse files Browse the repository at this point in the history
  • Loading branch information
lfcnassif committed Nov 20, 2020
1 parent 109ecc5 commit e985a9e
Showing 1 changed file with 2 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@
import java.io.Reader;
import java.lang.reflect.Constructor;
import java.nio.file.Files;
import java.nio.file.InvalidPathException;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.Collection;
Expand Down Expand Up @@ -954,14 +952,9 @@ private static Path loadDataSourcePath(File caseModuleDir, Path oldPath) throws

private static File checkIfEvidenceFolderExists(Item evidence, File localFile, File caseModuleDir)
throws IOException {
if (evidence.getPath().contains(">>"))
if (evidence.isSubItem())
return localFile;
Path path;
try {
path = Paths.get(evidence.getPath());
} catch (InvalidPathException e) {
return localFile;
}
Path path = localFile.toPath();
String pathSuffix = "";
if (path.getNameCount() > 1)
pathSuffix = path.subpath(1, path.getNameCount()).toString();
Expand Down

0 comments on commit e985a9e

Please sign in to comment.