mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-17 10:17:41 +00:00
More wor
This commit is contained in:
parent
77b5f3ad97
commit
87e2ab623a
@ -24,11 +24,13 @@ import java.util.ArrayList;
|
|||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.logging.Level;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
import org.apache.commons.io.FileUtils;
|
import org.apache.commons.io.FileUtils;
|
||||||
import org.sleuthkit.autopsy.casemodule.Case;
|
import org.sleuthkit.autopsy.casemodule.Case;
|
||||||
import org.sleuthkit.autopsy.corecomponentinterfaces.AutopsyService;
|
import org.sleuthkit.autopsy.corecomponentinterfaces.AutopsyService;
|
||||||
|
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||||
import org.sleuthkit.autopsy.coreutils.UNCPathUtilities;
|
import org.sleuthkit.autopsy.coreutils.UNCPathUtilities;
|
||||||
import org.sleuthkit.autopsy.coreutils.PlatformUtil;
|
import org.sleuthkit.autopsy.coreutils.PlatformUtil;
|
||||||
|
|
||||||
@ -69,6 +71,8 @@ class IndexHandling {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static String createReferenceIndexCopy(Case theCase, String indexPath) throws AutopsyService.AutopsyServiceException {
|
static String createReferenceIndexCopy(Case theCase, String indexPath) throws AutopsyService.AutopsyServiceException {
|
||||||
|
Logger logger = Logger.getLogger(IndexHandling.class.getName()); // ELTODO REMOVE
|
||||||
|
logger.log(Level.SEVERE, "ELTODO copying index at path {0} ", indexPath); //NON-NLS
|
||||||
String indexFolderName = "solr" + CURRENT_SOLR_VERSION + "_schema_" + CURRENT_SOLR_SCHEMA_VERSION;
|
String indexFolderName = "solr" + CURRENT_SOLR_VERSION + "_schema_" + CURRENT_SOLR_SCHEMA_VERSION;
|
||||||
try {
|
try {
|
||||||
// new index should be stored in "\ModuleOutput\keywordsearch\data\solrX_schema_Y\index"
|
// new index should be stored in "\ModuleOutput\keywordsearch\data\solrX_schema_Y\index"
|
||||||
@ -91,7 +95,11 @@ class IndexHandling {
|
|||||||
|
|
||||||
|
|
||||||
static void createReferenceConfigSetCopy(String indexPath) throws AutopsyService.AutopsyServiceException {
|
static void createReferenceConfigSetCopy(String indexPath) throws AutopsyService.AutopsyServiceException {
|
||||||
|
Logger logger = Logger.getLogger(IndexHandling.class.getName()); // ELTODO REMOVE
|
||||||
try {
|
try {
|
||||||
|
// ELTODO See if there is SOLR_HOME environment variable first
|
||||||
|
|
||||||
|
// if there is no SOLR_HOME:
|
||||||
// this will only work for Windows OS
|
// this will only work for Windows OS
|
||||||
if (!PlatformUtil.isWindowsOS()) {
|
if (!PlatformUtil.isWindowsOS()) {
|
||||||
throw new AutopsyService.AutopsyServiceException("ELTODO");
|
throw new AutopsyService.AutopsyServiceException("ELTODO");
|
||||||
@ -99,10 +107,13 @@ class IndexHandling {
|
|||||||
// config set should be located in "C:/some/directory/AutopsyXYZ/autopsy/solr/solr/configsets/"
|
// config set should be located in "C:/some/directory/AutopsyXYZ/autopsy/solr/solr/configsets/"
|
||||||
File pathToConfigSet = Paths.get(System.getProperty("user.dir"), RELATIVE_PATH_TO_CONFIG_SET).toFile();
|
File pathToConfigSet = Paths.get(System.getProperty("user.dir"), RELATIVE_PATH_TO_CONFIG_SET).toFile();
|
||||||
if (!pathToConfigSet.exists() || !pathToConfigSet.isDirectory()) {
|
if (!pathToConfigSet.exists() || !pathToConfigSet.isDirectory()) {
|
||||||
|
logger.log(Level.SEVERE, "ELTODO path {0} doesn''t exist", pathToConfigSet.getAbsolutePath()); //NON-NLS
|
||||||
// try the "release/solr/solr/configsets/" folder instead
|
// try the "release/solr/solr/configsets/" folder instead
|
||||||
pathToConfigSet = Paths.get(System.getProperty("user.dir"), RELATIVE_PATH_TO_CONFIG_SET_2).toFile();
|
pathToConfigSet = Paths.get(System.getProperty("user.dir"), RELATIVE_PATH_TO_CONFIG_SET_2).toFile();
|
||||||
if (!pathToConfigSet.exists() || !pathToConfigSet.isDirectory()) {
|
if (!pathToConfigSet.exists() || !pathToConfigSet.isDirectory()) {
|
||||||
throw new AutopsyService.AutopsyServiceException("ELTODO");
|
logger.log(Level.SEVERE, "ELTODO path {0} doesn''t exist", pathToConfigSet.getAbsolutePath()); //NON-NLS
|
||||||
|
return;
|
||||||
|
// ELTODO This is NTH: throw new AutopsyService.AutopsyServiceException("ELTODO");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
File targetDirPath = new File(indexPath); //NON-NLS
|
File targetDirPath = new File(indexPath); //NON-NLS
|
||||||
|
@ -28,7 +28,6 @@ import java.util.MissingResourceException;
|
|||||||
import org.sleuthkit.autopsy.core.RuntimeProperties;
|
import org.sleuthkit.autopsy.core.RuntimeProperties;
|
||||||
import org.openide.util.lookup.ServiceProvider;
|
import org.openide.util.lookup.ServiceProvider;
|
||||||
import org.openide.util.lookup.ServiceProviders;
|
import org.openide.util.lookup.ServiceProviders;
|
||||||
import org.sleuthkit.autopsy.casemodule.Case;
|
|
||||||
import org.sleuthkit.autopsy.keywordsearchservice.KeywordSearchService;
|
import org.sleuthkit.autopsy.keywordsearchservice.KeywordSearchService;
|
||||||
import org.sleuthkit.autopsy.keywordsearchservice.KeywordSearchServiceException;
|
import org.sleuthkit.autopsy.keywordsearchservice.KeywordSearchServiceException;
|
||||||
import org.sleuthkit.datamodel.BlackboardArtifact;
|
import org.sleuthkit.datamodel.BlackboardArtifact;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user