mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-14 17:06:16 +00:00
Merge pull request #6989 from APriestman/7581_removeNamesFromExtractedFiles
7581 Remove name from extracted files
This commit is contained in:
commit
e81d17173f
@ -94,8 +94,8 @@ public final class EmbeddedFileExtractorIngestModule extends FileIngestModuleAda
|
||||
*
|
||||
*/
|
||||
Case currentCase = Case.getCurrentCase();
|
||||
String moduleDirAbsolute = Paths.get(currentCase.getModuleDirectory(), EmbeddedFileExtractorModuleFactory.getModuleName()).toString();
|
||||
String moduleDirRelative = Paths.get(currentCase.getModuleOutputDirectoryRelativePath(), EmbeddedFileExtractorModuleFactory.getModuleName()).toString();
|
||||
String moduleDirAbsolute = Paths.get(currentCase.getModuleDirectory(), EmbeddedFileExtractorModuleFactory.getOutputFolderName()).toString();
|
||||
String moduleDirRelative = Paths.get(currentCase.getModuleOutputDirectoryRelativePath(), EmbeddedFileExtractorModuleFactory.getOutputFolderName()).toString();
|
||||
|
||||
if (refCounter.incrementAndGet(jobId) == 1) {
|
||||
|
||||
@ -217,15 +217,15 @@ public final class EmbeddedFileExtractorIngestModule extends FileIngestModuleAda
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a unique name for a file by concatentating the file name and the
|
||||
* file object id.
|
||||
* Creates a unique name for a file.
|
||||
* Currently this is just the file object id to prevent long paths and illegal characters.
|
||||
*
|
||||
* @param file The file.
|
||||
*
|
||||
* @return The unique file name.
|
||||
*/
|
||||
static String getUniqueName(AbstractFile file) {
|
||||
return file.getName() + "_" + file.getId();
|
||||
return Long.toString(file.getId());
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -45,6 +45,10 @@ public class EmbeddedFileExtractorModuleFactory extends IngestModuleFactoryAdapt
|
||||
public String getModuleDisplayName() {
|
||||
return getModuleName();
|
||||
}
|
||||
|
||||
static String getOutputFolderName() {
|
||||
return "EFE";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getModuleDescription() {
|
||||
|
@ -112,8 +112,8 @@ public class ExtractArchiveWithPasswordAction extends AbstractAction {
|
||||
protected Boolean doInBackground() {
|
||||
boolean done = false;
|
||||
try {
|
||||
String moduleDirRelative = Paths.get(Case.getCurrentCaseThrows().getModuleOutputDirectoryRelativePath(), EmbeddedFileExtractorModuleFactory.getModuleName()).toString();
|
||||
String moduleDirAbsolute = Paths.get(Case.getCurrentCaseThrows().getModuleDirectory(), EmbeddedFileExtractorModuleFactory.getModuleName()).toString();
|
||||
String moduleDirRelative = Paths.get(Case.getCurrentCaseThrows().getModuleOutputDirectoryRelativePath(), EmbeddedFileExtractorModuleFactory.getOutputFolderName()).toString();
|
||||
String moduleDirAbsolute = Paths.get(Case.getCurrentCaseThrows().getModuleDirectory(), EmbeddedFileExtractorModuleFactory.getOutputFolderName()).toString();
|
||||
/*
|
||||
* Construct a file type detector.
|
||||
*/
|
||||
|
@ -724,7 +724,7 @@ class SevenZipExtractor {
|
||||
if (checkForIngestCancellation(archiveFile)) {
|
||||
return false;
|
||||
}
|
||||
final String uniqueExtractedName = FileUtil.escapeFileName(uniqueArchiveFileName + File.separator + (inArchiveItemIndex / 1000) + File.separator + inArchiveItemIndex + "_" + new File(pathInArchive).getName());
|
||||
final String uniqueExtractedName = FileUtil.escapeFileName(uniqueArchiveFileName + File.separator + (inArchiveItemIndex / 1000) + File.separator + inArchiveItemIndex);
|
||||
final String localAbsPath = moduleDirAbsolute + File.separator + uniqueExtractedName;
|
||||
final String localRelPath = moduleDirRelative + File.separator + uniqueExtractedName;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user