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

Separated saving file and updating db

parent 906e0319
No related branches found
No related tags found
No related merge requests found
......@@ -50,7 +50,7 @@ public class FileRepositoryManager {
fileDownloadFolder = "";
}
public void initializeSettings(FileRepositorySettings settings, String fileDownloadPath) {
public synchronized void initializeSettings(FileRepositorySettings settings, String fileDownloadPath) {
this.settings = settings;
this.fileDownloadFolder = fileDownloadPath;
}
......@@ -58,7 +58,7 @@ public void initializeSettings(FileRepositorySettings settings, String fileDownl
/**
* Check whether the file repository has been initialized.
*/
public boolean isEnabled() {
public synchronized boolean isEnabled() {
return settings != null;
}
......@@ -142,7 +142,7 @@ private void downloadFileFromFileService(AbstractFile abstractFile, String downl
* @param abstractFile
* @param trans
*/
public void saveToFileRepository(AbstractFile abstractFile, SleuthkitCase.CaseDbTransaction trans) throws TskCoreException {
public void saveToFileRepository(AbstractFile abstractFile) throws TskCoreException {
if (! isEnabled()) {
throw new TskCoreException("File repository is not enabled");
......@@ -167,6 +167,9 @@ public void saveToFileRepository(AbstractFile abstractFile, SleuthkitCase.CaseDb
// Save the abstractFile data
saveLocalFileToFileService(filePath);
}
public void updateFileToUseFileRepository(AbstractFile abstractFile, SleuthkitCase.CaseDbTransaction trans)throws TskCoreException {
// Update the file table entry
try {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment