diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/Manifest.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/Manifest.java index 5a42a01e80..c2b7ae5259 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/Manifest.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/Manifest.java @@ -30,32 +30,35 @@ import javax.annotation.concurrent.Immutable; public final class Manifest implements Serializable { private static final long serialVersionUID = 1L; - private final String filePath; + private final Path filePath; private final Date dateFileCreated; private final String caseName; private final String deviceId; - private final String dataSourcePath; + private final Path dataSourcePath; + private final String dataSourceFileName; private final Map manifestProperties; public Manifest(Path manifestFilePath, Date dateFileCreated, String caseName, String deviceId, Path dataSourcePath, Map manifestProperties) { - this.filePath = manifestFilePath.toString(); - this.dateFileCreated = dateFileCreated; + this.filePath = Paths.get(manifestFilePath.toString()); + this.dateFileCreated = new Date(dateFileCreated.getTime()); this.caseName = caseName; this.deviceId = deviceId; if (null != dataSourcePath) { - this.dataSourcePath = dataSourcePath.toString(); + this.dataSourcePath = Paths.get(dataSourcePath.toString()); + dataSourceFileName = dataSourcePath.getFileName().toString(); } else { - this.dataSourcePath = ""; + this.dataSourcePath = Paths.get(""); + dataSourceFileName = ""; } this.manifestProperties = new HashMap<>(manifestProperties); } public Path getFilePath() { - return Paths.get(this.filePath); + return this.filePath; } public Date getDateFileCreated() { - return new Date(this.dateFileCreated.getTime()); + return dateFileCreated; } public String getCaseName() { @@ -67,11 +70,11 @@ public final class Manifest implements Serializable { } public Path getDataSourcePath() { - return Paths.get(dataSourcePath); + return dataSourcePath; } public String getDataSourceFileName() { - return Paths.get(dataSourcePath).getFileName().toString(); + return dataSourceFileName; } public Map getManifestProperties() {