From c59e9e2f9d61cb364d790b5b3d59f4f02ed607a4 Mon Sep 17 00:00:00 2001 From: Karl Mortensen Date: Tue, 2 Jun 2015 09:58:14 -0400 Subject: [PATCH] reduce size of free space required for carving, as the file is already copied to the drive, we don't need 2x. Also warn the user if carving doesn't occur because of lack of disk space. --- .../autopsy/modules/photoreccarver/Bundle.properties | 4 +++- .../photoreccarver/PhotoRecCarverFileIngestModule.java | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/modules/photoreccarver/Bundle.properties b/Core/src/org/sleuthkit/autopsy/modules/photoreccarver/Bundle.properties index f5bd1d85ea..442bc51366 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/photoreccarver/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/modules/photoreccarver/Bundle.properties @@ -11,4 +11,6 @@ missingExecutable.message=Unable to locate unallocated carver executable. cannotRunExecutable.message=Unable to execute unallocated carver cannotCreateOutputDir.message=Unable to create output directory: {0} PhotoRecIngestModule.processTerminated=PhotoRec Carver ingest module was terminated due to exceeding max allowable run time when scanning -PhotoRecIngestModule.moduleError=PhotoRec Carver Module Error \ No newline at end of file +PhotoRecIngestModule.moduleError=PhotoRec Carver Module Error +PhotoRecIngestModule.UnableToCarve=Unable to carve with PhotoRec +PhotoRecIngestModule.NotEnoughDiskSpace=Not enough disk space to carve files. Carving will be skipped. \ No newline at end of file diff --git a/Core/src/org/sleuthkit/autopsy/modules/photoreccarver/PhotoRecCarverFileIngestModule.java b/Core/src/org/sleuthkit/autopsy/modules/photoreccarver/PhotoRecCarverFileIngestModule.java index 8a35a4edbf..25df83b5dc 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/photoreccarver/PhotoRecCarverFileIngestModule.java +++ b/Core/src/org/sleuthkit/autopsy/modules/photoreccarver/PhotoRecCarverFileIngestModule.java @@ -147,9 +147,11 @@ final class PhotoRecCarverFileIngestModule implements FileIngestModule { // Some network drives always return -1 for free disk space. // In this case, expect enough space and move on. long freeDiskSpace = IngestServices.getInstance().getFreeDiskSpace(); - if ((freeDiskSpace!=-1) && ((file.getSize() * 2) > freeDiskSpace)) { + if ((freeDiskSpace != -1) && ((file.getSize() * 1.2) > freeDiskSpace)) { logger.log(Level.SEVERE, "PhotoRec error processing {0} with {1} Not enough space on primary disk to carve unallocated space.", // NON-NLS new Object[]{file.getName(), PhotoRecCarverIngestModuleFactory.getModuleName()}); // NON-NLS + MessageNotifyUtil.Notify.error(NbBundle.getMessage(PhotoRecCarverFileIngestModule.class, "PhotoRecIngestModule.UnableToCarve"), + NbBundle.getMessage(PhotoRecCarverFileIngestModule.class, "PhotoRecIngestModule.NotEnoughDiskSpace")); return IngestModule.ProcessResult.ERROR; }