mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-12 07:56:16 +00:00
Set md5, known, and MIME type when making the local file.
Remove call to closeConnections
This commit is contained in:
parent
653667da62
commit
165f22182a
@ -395,12 +395,9 @@ public class CreatePortableCaseModule implements GeneralReportModule {
|
|||||||
|
|
||||||
newContent = skCase.addLocalFile(abstractFile.getName(), relativePath, abstractFile.getSize(),
|
newContent = skCase.addLocalFile(abstractFile.getName(), relativePath, abstractFile.getSize(),
|
||||||
abstractFile.getCtime(), abstractFile.getCrtime(), abstractFile.getAtime(), abstractFile.getMtime(),
|
abstractFile.getCtime(), abstractFile.getCrtime(), abstractFile.getAtime(), abstractFile.getMtime(),
|
||||||
|
abstractFile.getMd5Hash(), abstractFile.getKnown(), abstractFile.getMIMEType(),
|
||||||
true, TskData.EncodingType.NONE,
|
true, TskData.EncodingType.NONE,
|
||||||
newParent, trans);
|
newParent, trans);
|
||||||
((AbstractFile)newContent).setKnown(abstractFile.getKnown());
|
|
||||||
((AbstractFile)newContent).setMIMEType(abstractFile.getMIMEType());
|
|
||||||
((AbstractFile)newContent).setMd5Hash(abstractFile.getMd5Hash());
|
|
||||||
((AbstractFile)newContent).save(trans);
|
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
throw new TskCoreException("Error copying file " + abstractFile.getName() + " with original obj ID "
|
throw new TskCoreException("Error copying file " + abstractFile.getName() + " with original obj ID "
|
||||||
+ abstractFile.getId(), ex);
|
+ abstractFile.getId(), ex);
|
||||||
@ -446,8 +443,7 @@ public class CreatePortableCaseModule implements GeneralReportModule {
|
|||||||
oldTagNameToNewTagName.clear();
|
oldTagNameToNewTagName.clear();
|
||||||
currentCase = null;
|
currentCase = null;
|
||||||
if (skCase != null) {
|
if (skCase != null) {
|
||||||
// Do not call close() here! It will close all the handles for the current case in the JNI cache.
|
// We want to close the database connections here but it is currently not possible. JIRA-4736
|
||||||
skCase.closeConnections();
|
|
||||||
skCase = null;
|
skCase = null;
|
||||||
}
|
}
|
||||||
caseFolder = null;
|
caseFolder = null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user