1
0
mirror of https://github.com/elisspace/autopsy.git synced 2026-09-06 02:24:30 +00:00

Merge pull request #1299 from karlmortensen/better_disk_space_checking

reduce size of free space required for carving, as the file is alread…
This commit is contained in:
Richard Cordovano
2015-06-02 14:38:06 -04:00
2 changed files with 6 additions and 2 deletions

View File

@@ -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
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.

View File

@@ -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;
}