Skip to content
Snippets Groups Projects
Commit e7866706 authored by apriestman's avatar apriestman
Browse files

Include object ID on host name

parent 089f4590
Branches
Tags
No related merge requests found
......@@ -6612,7 +6612,7 @@ public Image addImage(TskData.TSK_IMG_TYPE_ENUM type, long sectorSize, long size
if (name.isEmpty()) {
host = getHostManager().createHost("Image_" + newObjId + " Host", transaction);
} else {
host = getHostManager().createHost(name + " Host", transaction);
host = getHostManager().createHost(name + "_" + newObjId + " Host", transaction);
}
}
 
......
......@@ -1002,17 +1002,6 @@ public static Image addImageToDatabase(SleuthkitCase skCase, String[] imagePaths
// Now save to database
CaseDbTransaction transaction = skCase.beginTransaction();
try {
if (host == null) {
String hostName;
if (computedPaths.size() > 0) {
String path = computedPaths.get(0);
hostName = (new java.io.File(path)).getName() + " Host";
} else {
hostName = "Image_" + deviceId + " Host";
}
host = skCase.getHostManager().createHost(hostName, transaction);
}
Image img = skCase.addImage(TskData.TSK_IMG_TYPE_ENUM.valueOf(type), computedSectorSize,
size, null, computedPaths,
timeZone, md5, sha1, sha256,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment