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

Cleanup

parent 077cf386
Branches
Tags
No related merge requests found
...@@ -42,11 +42,4 @@ public interface AddDataSourceCallbacks { ...@@ -42,11 +42,4 @@ public interface AddDataSourceCallbacks {
* @throws AddDataSourceCallbacksException * @throws AddDataSourceCallbacksException
*/ */
void onFilesAdded(List<Long> fileObjectIds) throws AddDataSourceCallbacksException; void onFilesAdded(List<Long> fileObjectIds) throws AddDataSourceCallbacksException;
/**
* Call when the data source processing is complete.
*
* @throws AddDataSourceCallbacksException
*/
void onCompleted() throws AddDataSourceCallbacksException;
} }
...@@ -403,6 +403,7 @@ private long addBatchedFilesToDb() { ...@@ -403,6 +403,7 @@ private long addBatchedFilesToDb() {
logger.log(Level.SEVERE, "Error adding file to the database - parent object ID: " + computedParentObjId logger.log(Level.SEVERE, "Error adding file to the database - parent object ID: " + computedParentObjId
+ ", file system object ID: " + fileInfo.fsObjId + ", name: " + fileInfo.name, ex); + ", file system object ID: " + fileInfo.fsObjId + ", name: " + fileInfo.name, ex);
revertTransaction(); revertTransaction();
batchedFiles.clear();
return -1; return -1;
} }
} }
...@@ -413,12 +414,14 @@ private long addBatchedFilesToDb() { ...@@ -413,12 +414,14 @@ private long addBatchedFilesToDb() {
addDataSourceCallbacks.onFilesAdded(newObjIds); addDataSourceCallbacks.onFilesAdded(newObjIds);
} catch (AddDataSourceCallbacksException ex) { } catch (AddDataSourceCallbacksException ex) {
logger.log(Level.SEVERE, "Error adding files to ingest stream"); logger.log(Level.SEVERE, "Error adding files to ingest stream");
batchedFiles.clear();
return -1; return -1;
} }
} }
} catch (TskCoreException ex) { } catch (TskCoreException ex) {
logger.log(Level.SEVERE, "Error adding batched files to database", ex); logger.log(Level.SEVERE, "Error adding batched files to database", ex);
revertTransaction(); revertTransaction();
batchedFiles.clear();
return -1; return -1;
} }
batchedFiles.clear(); batchedFiles.clear();
......
...@@ -550,6 +550,7 @@ public void run(String deviceId, String[] imageFilePaths, int sectorSize) throws ...@@ -550,6 +550,7 @@ public void run(String deviceId, String[] imageFilePaths, int sectorSize) throws
* (e.g., a UUID). * (e.g., a UUID).
* @param imageFilePaths Full path(s) to the image file(s). * @param imageFilePaths Full path(s) to the image file(s).
* @param sectorSize The sector size (use '0' for autodetect). * @param sectorSize The sector size (use '0' for autodetect).
* @param addDataSourceCallbacks The callbacks to use to send data to ingest (may do nothing).
* *
* @throws TskCoreException if a critical error occurs within the * @throws TskCoreException if a critical error occurs within the
* SleuthKit. * SleuthKit.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment