From 165f22182a9ab7eb6b989d1bbad66100ea3690c2 Mon Sep 17 00:00:00 2001 From: Ann Priestman Date: Wed, 13 Feb 2019 19:09:48 -0500 Subject: [PATCH] Set md5, known, and MIME type when making the local file. Remove call to closeConnections --- .../autopsy/report/CreatePortableCaseModule.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/report/CreatePortableCaseModule.java b/Core/src/org/sleuthkit/autopsy/report/CreatePortableCaseModule.java index 517436d603..f71541f65f 100644 --- a/Core/src/org/sleuthkit/autopsy/report/CreatePortableCaseModule.java +++ b/Core/src/org/sleuthkit/autopsy/report/CreatePortableCaseModule.java @@ -395,12 +395,9 @@ public class CreatePortableCaseModule implements GeneralReportModule { newContent = skCase.addLocalFile(abstractFile.getName(), relativePath, abstractFile.getSize(), abstractFile.getCtime(), abstractFile.getCrtime(), abstractFile.getAtime(), abstractFile.getMtime(), + abstractFile.getMd5Hash(), abstractFile.getKnown(), abstractFile.getMIMEType(), true, TskData.EncodingType.NONE, newParent, trans); - ((AbstractFile)newContent).setKnown(abstractFile.getKnown()); - ((AbstractFile)newContent).setMIMEType(abstractFile.getMIMEType()); - ((AbstractFile)newContent).setMd5Hash(abstractFile.getMd5Hash()); - ((AbstractFile)newContent).save(trans); } catch (IOException ex) { throw new TskCoreException("Error copying file " + abstractFile.getName() + " with original obj ID " + abstractFile.getId(), ex); @@ -446,8 +443,7 @@ public class CreatePortableCaseModule implements GeneralReportModule { oldTagNameToNewTagName.clear(); currentCase = null; if (skCase != null) { - // Do not call close() here! It will close all the handles for the current case in the JNI cache. - skCase.closeConnections(); + // We want to close the database connections here but it is currently not possible. JIRA-4736 skCase = null; } caseFolder = null;