mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
fixes
This commit is contained in:
parent
6d234efe46
commit
e02bcedb1b
@ -217,6 +217,7 @@ public class Installer extends ModuleInstall {
|
||||
packageInstallers.add(org.sleuthkit.autopsy.casemodule.Installer.getDefault());
|
||||
packageInstallers.add(org.sleuthkit.autopsy.texttranslation.translators.Installer.getDefault());
|
||||
packageInstallers.add(org.sleuthkit.autopsy.modules.hashdatabase.infrastructure.Installer.getDefault());
|
||||
packageInstallers.add(org.sleuthkit.autopsy.report.infrastructure.Installer.getDefault());
|
||||
|
||||
/**
|
||||
* This is a temporary workaround for the following bug in Tika that
|
||||
|
@ -87,6 +87,8 @@ public final class UserPreferences {
|
||||
static {
|
||||
// perform initial load to ensure disk preferences are loaded
|
||||
try {
|
||||
// make shared directory paths if they don't exist.
|
||||
new File(SharedConfigPath.getInstance().getSharedConfigPath()).mkdirs();
|
||||
viewPreferences.load();
|
||||
machineSpecificPreferences.load();
|
||||
modePreferences.load();
|
||||
|
@ -27,6 +27,7 @@ import org.openide.modules.ModuleInstall;
|
||||
import org.python.icu.text.MessageFormat;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.coreutils.PlatformUtil;
|
||||
import org.sleuthkit.autopsy.modules.hashdatabase.HashDbManager;
|
||||
|
||||
/**
|
||||
* Installer for hash databases that copies legacy settings to new location.
|
||||
@ -47,7 +48,7 @@ public class Installer extends ModuleInstall {
|
||||
* package.
|
||||
*
|
||||
* @return The "package installer" singleton for the
|
||||
* org.sleuthkit.autopsy.centralrepository.eventlisteners package.
|
||||
* org.sleuthkit.autopsy.modules.hashdatabase package.
|
||||
*/
|
||||
public synchronized static Installer getDefault() {
|
||||
if (instance == null) {
|
||||
@ -72,6 +73,7 @@ public class Installer extends ModuleInstall {
|
||||
File dbPath = new File(HashConfigPaths.getInstance().getDefaultDbPath());
|
||||
if (legacyDbPath.exists() && !dbPath.exists()) {
|
||||
try {
|
||||
dbPath.getParentFile().mkdirs();
|
||||
FileUtils.copyDirectory(legacyDbPath, dbPath);
|
||||
} catch (IOException ex) {
|
||||
logger.log(Level.WARNING, MessageFormat.format("There was an error copying legacy path hash dbs from {0} to {1}", legacyDbPath, dbPath), ex);
|
||||
@ -83,6 +85,7 @@ public class Installer extends ModuleInstall {
|
||||
File settingsFile = new File(HashConfigPaths.getInstance().getSettingsPath());
|
||||
if (legacySettingsFile.exists() && !settingsFile.exists()) {
|
||||
try {
|
||||
settingsFile.getParentFile().mkdirs();
|
||||
FileUtils.copyFile(legacySettingsFile, settingsFile);
|
||||
} catch (IOException ex) {
|
||||
logger.log(Level.WARNING, MessageFormat.format("There was an error copying legacy hash db settings from {0} to {1}", legacySettingsFile, settingsFile), ex);
|
||||
@ -93,12 +96,14 @@ public class Installer extends ModuleInstall {
|
||||
File xmlSettingsFile = new File(HashConfigPaths.getInstance().getXmlSettingsPath());
|
||||
if (legacyXmlSettingsFile.exists() && !xmlSettingsFile.exists()) {
|
||||
try {
|
||||
xmlSettingsFile.getParentFile().mkdirs();
|
||||
FileUtils.copyFile(legacyXmlSettingsFile, xmlSettingsFile);
|
||||
} catch (IOException ex) {
|
||||
logger.log(Level.WARNING, MessageFormat.format("There was an error copying legacy xml hash db settings from {0} to {1}", legacyXmlSettingsFile, xmlSettingsFile), ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
HashDbManager.getInstance().loadLastSavedConfiguration();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -18,7 +18,8 @@
|
||||
*/
|
||||
package org.sleuthkit.autopsy.modules.interestingitems;
|
||||
|
||||
import com.google.common.annotations.Beta;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
@ -27,7 +28,9 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Observable;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.sleuthkit.autopsy.core.configpath.SharedConfigPath;
|
||||
import org.sleuthkit.autopsy.coreutils.PlatformUtil;
|
||||
import org.sleuthkit.autopsy.modules.interestingitems.FilesSet.Rule;
|
||||
import org.sleuthkit.autopsy.modules.interestingitems.FilesSet.Rule.MetaTypeCondition;
|
||||
@ -47,8 +50,10 @@ public final class FilesSetsManager extends Observable {
|
||||
private static final String LEGACY_FILES_SET_DEFS_FILE_NAME = "InterestingFilesSetDefs.xml"; //NON-NLS
|
||||
private static final String INTERESTING_FILES_SET_DEFS_NAME = "InterestingFileSets.settings";
|
||||
private static final String FILE_INGEST_FILTER_DEFS_NAME = "FileIngestFilterDefs.settings";
|
||||
private static final String FILE_FILTER_PATH = Paths.get(PlatformUtil.getUserConfigDirectory(), FILE_INGEST_FILTER_DEFS_NAME).toAbsolutePath().toString();
|
||||
private static final String INTERESTING_ITEM_PATH = Paths.get(PlatformUtil.getUserConfigDirectory(), INTERESTING_FILES_SET_DEFS_NAME).toAbsolutePath().toString();
|
||||
private static final String LEGACY_SETTINGS_PATH = PlatformUtil.getUserConfigDirectory();
|
||||
private static final String SETTINGS_PATH = SharedConfigPath.getInstance().getSharedConfigPath();
|
||||
private static final String FILE_FILTER_PATH = Paths.get(SETTINGS_PATH, FILE_INGEST_FILTER_DEFS_NAME).toAbsolutePath().toString();
|
||||
private static final String INTERESTING_ITEM_PATH = Paths.get(SETTINGS_PATH, INTERESTING_FILES_SET_DEFS_NAME).toAbsolutePath().toString();
|
||||
private static final Object FILE_INGEST_FILTER_LOCK = new Object();
|
||||
private static final Object INTERESTING_FILES_SET_LOCK = new Object();
|
||||
private static FilesSetsManager instance;
|
||||
@ -133,7 +138,7 @@ public final class FilesSetsManager extends Observable {
|
||||
*/
|
||||
public Map<String, FilesSet> getCustomFileIngestFilters() throws FilesSetsManagerException {
|
||||
synchronized (FILE_INGEST_FILTER_LOCK) {
|
||||
return FileSetsDefinitions.readSerializedDefinitions(PlatformUtil.getUserConfigDirectory(), FILE_INGEST_FILTER_DEFS_NAME);
|
||||
return FileSetsDefinitions.readSerializedDefinitions(SharedConfigPath.getInstance().getSharedConfigPath(), FILE_INGEST_FILTER_DEFS_NAME);
|
||||
}
|
||||
}
|
||||
|
||||
@ -156,7 +161,7 @@ public final class FilesSetsManager extends Observable {
|
||||
*/
|
||||
void setCustomFileIngestFilters(Map<String, FilesSet> filesSets) throws FilesSetsManagerException {
|
||||
synchronized (FILE_INGEST_FILTER_LOCK) {
|
||||
FileSetsDefinitions.writeDefinitionsFile(PlatformUtil.getUserConfigDirectory(), FILE_INGEST_FILTER_DEFS_NAME, filesSets);
|
||||
FileSetsDefinitions.writeDefinitionsFile(SharedConfigPath.getInstance().getSharedConfigPath(), FILE_INGEST_FILTER_DEFS_NAME, filesSets);
|
||||
}
|
||||
}
|
||||
|
||||
@ -168,7 +173,7 @@ public final class FilesSetsManager extends Observable {
|
||||
*/
|
||||
public Map<String, FilesSet> getInterestingFilesSets() throws FilesSetsManagerException {
|
||||
synchronized (INTERESTING_FILES_SET_LOCK) {
|
||||
return InterestingItemsFilesSetSettings.readDefinitionsFile(PlatformUtil.getUserConfigDirectory(), INTERESTING_FILES_SET_DEFS_NAME, LEGACY_FILES_SET_DEFS_FILE_NAME);
|
||||
return InterestingItemsFilesSetSettings.readDefinitionsFile(SharedConfigPath.getInstance().getSharedConfigPath(), INTERESTING_FILES_SET_DEFS_NAME, LEGACY_FILES_SET_DEFS_FILE_NAME);
|
||||
}
|
||||
}
|
||||
|
||||
@ -181,12 +186,27 @@ public final class FilesSetsManager extends Observable {
|
||||
*/
|
||||
void setInterestingFilesSets(Map<String, FilesSet> filesSets) throws FilesSetsManagerException {
|
||||
synchronized (INTERESTING_FILES_SET_LOCK) {
|
||||
InterestingItemsFilesSetSettings.writeDefinitionsFile(PlatformUtil.getUserConfigDirectory(), INTERESTING_FILES_SET_DEFS_NAME, filesSets);
|
||||
InterestingItemsFilesSetSettings.writeDefinitionsFile(SharedConfigPath.getInstance().getSharedConfigPath(), INTERESTING_FILES_SET_DEFS_NAME, filesSets);
|
||||
this.setChanged();
|
||||
this.notifyObservers();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Moves config files to current expected location.
|
||||
*/
|
||||
void upgradeConfig() throws IOException {
|
||||
for (String fileName : new String[]{LEGACY_FILES_SET_DEFS_FILE_NAME, FILE_INGEST_FILTER_DEFS_NAME, INTERESTING_FILES_SET_DEFS_NAME }) {
|
||||
File oldPath = Paths.get(LEGACY_SETTINGS_PATH, fileName).toFile();
|
||||
File newPath = Paths.get(SETTINGS_PATH, fileName).toFile();
|
||||
|
||||
if (oldPath.exists() && !newPath.exists()) {
|
||||
newPath.getParentFile().mkdirs();
|
||||
FileUtils.copyFile(oldPath, newPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static class FilesSetsManagerException extends Exception {
|
||||
|
||||
FilesSetsManagerException() {
|
||||
|
@ -20,6 +20,7 @@ package org.sleuthkit.autopsy.modules.interestingitems;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FilenameFilter;
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
@ -34,7 +35,7 @@ import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil;
|
||||
|
||||
/**
|
||||
* When the interesting items module loads, this runnable loads standard
|
||||
* interesting file set rules.
|
||||
* interesting file set rules and performs upgrades.
|
||||
*/
|
||||
@OnStart
|
||||
public class StandardInterestingFilesSetsLoader implements Runnable {
|
||||
@ -57,6 +58,8 @@ public class StandardInterestingFilesSetsLoader implements Runnable {
|
||||
"StandardInterestingFilesSetsLoader_cannotUpdateInterestingFilesSets=Unable to write updated configuration for interesting files sets to config directory."
|
||||
})
|
||||
public void run() {
|
||||
upgradeConfig();
|
||||
|
||||
Map<String, FilesSet> standardInterestingFileSets = null;
|
||||
try {
|
||||
standardInterestingFileSets = readStandardFileXML();
|
||||
@ -86,6 +89,17 @@ public class StandardInterestingFilesSetsLoader implements Runnable {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Moves settings to new location.
|
||||
*/
|
||||
private void upgradeConfig() {
|
||||
try {
|
||||
FilesSetsManager.getInstance().upgradeConfig();
|
||||
} catch (IOException ex) {
|
||||
LOGGER.log(Level.WARNING, "There was an error while upgrading config paths.", ex);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Responsible for handling top level exceptions and displaying to the user.
|
||||
*
|
||||
|
@ -0,0 +1,67 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2022 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.report.infrastructure;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.logging.Level;
|
||||
import org.openide.modules.ModuleInstall;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
|
||||
/**
|
||||
* Installer for hash databases that copies legacy settings to new location.
|
||||
*/
|
||||
public class Installer extends ModuleInstall {
|
||||
private static final Logger logger = Logger.getLogger(Installer.class.getName());
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static Installer instance;
|
||||
|
||||
/**
|
||||
* Gets the singleton "package installer" used by the registered Installer
|
||||
* for the Autopsy-Core module located in the org.sleuthkit.autopsy.core
|
||||
* package.
|
||||
*
|
||||
* @return The singleton instance of this class.
|
||||
*/
|
||||
public synchronized static Installer getDefault() {
|
||||
if (instance == null) {
|
||||
instance = new Installer();
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs the singleton "package installer" used by the registered
|
||||
* Installer for the Autopsy-Core module located in the
|
||||
* org.sleuthkit.autopsy.core package.
|
||||
*/
|
||||
private Installer() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void restored() {
|
||||
try {
|
||||
ReportingConfigLoader.upgradeConfig();
|
||||
} catch (IOException ex) {
|
||||
logger.log(Level.WARNING, "There was an error while upgrading config paths.", ex);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -34,10 +34,12 @@ import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
import java.util.logging.Level;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.openide.util.io.NbObjectInputStream;
|
||||
import org.openide.util.io.NbObjectOutputStream;
|
||||
import org.sleuthkit.autopsy.core.configpath.SharedConfigPath;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.coreutils.PlatformUtil;
|
||||
import org.sleuthkit.autopsy.report.GeneralReportSettings;
|
||||
|
||||
/**
|
||||
@ -49,17 +51,23 @@ final class ReportingConfigLoader {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(ReportingConfigLoader.class.getName());
|
||||
private static final String REPORT_CONFIG_FOLDER = "ReportingConfigs"; //NON-NLS
|
||||
private static final String REPORT_CONFIG_FOLDER_PATH = Paths.get(
|
||||
SharedConfigPath.getInstance().getSharedConfigPath(),
|
||||
|
||||
private static final String REPORT_CONFIG_FOLDER_PATH_LEGACY = Paths.get(
|
||||
PlatformUtil.getUserConfigDirectory(),
|
||||
ReportingConfigLoader.REPORT_CONFIG_FOLDER
|
||||
).toAbsolutePath().toString();
|
||||
|
||||
|
||||
private static final String REPORT_CONFIG_FOLDER_PATH = Paths.get(
|
||||
SharedConfigPath.getInstance().getSharedConfigPath(),
|
||||
ReportingConfigLoader.REPORT_CONFIG_FOLDER
|
||||
).toAbsolutePath().toString();
|
||||
|
||||
private static final String REPORT_SETTINGS_FILE_EXTENSION = ".settings";
|
||||
private static final String TABLE_REPORT_CONFIG_FILE = "TableReportSettings.settings";
|
||||
private static final String FILE_REPORT_CONFIG_FILE = "FileReportSettings.settings";
|
||||
private static final String GENERAL_REPORT_CONFIG_FILE = "GeneralReportSettings.settings";
|
||||
private static final String MODULE_CONFIG_FILE = "ModuleConfigs.settings";
|
||||
|
||||
|
||||
// Collection of standard report modules that are no longer in Autopsy. We keep
|
||||
// track to suppress any errors when searching for the module since it may still
|
||||
// existing in the configuration file.
|
||||
@ -111,7 +119,7 @@ final class ReportingConfigLoader {
|
||||
} catch (IOException | ClassNotFoundException ex) {
|
||||
throw new ReportConfigException("Unable to read file report settings " + filePath, ex);
|
||||
}
|
||||
|
||||
|
||||
filePath = reportDirPath.resolve(GENERAL_REPORT_CONFIG_FILE).toString();
|
||||
try (NbObjectInputStream in = new NbObjectInputStream(new FileInputStream(filePath))) {
|
||||
config.setGeneralReportSettings((GeneralReportSettings) in.readObject());
|
||||
@ -199,7 +207,7 @@ final class ReportingConfigLoader {
|
||||
} catch (IOException ex) {
|
||||
throw new ReportConfigException("Unable to save file report configuration " + filePath, ex);
|
||||
}
|
||||
|
||||
|
||||
filePath = pathToConfigDir.resolve(GENERAL_REPORT_CONFIG_FILE).toString();
|
||||
try (NbObjectOutputStream out = new NbObjectOutputStream(new FileOutputStream(filePath))) {
|
||||
out.writeObject(reportConfig.getGeneralReportSettings());
|
||||
@ -236,13 +244,13 @@ final class ReportingConfigLoader {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return a list of the names of the report profiles in the
|
||||
* REPORT_CONFIG_FOLDER_PATH.
|
||||
*
|
||||
* @return Naturally ordered list of report profile names. If none were found
|
||||
* the list will be empty.
|
||||
* @return Naturally ordered list of report profile names. If none were
|
||||
* found the list will be empty.
|
||||
*/
|
||||
static synchronized Set<String> getListOfReportConfigs() {
|
||||
File reportDirPath = new File(ReportingConfigLoader.REPORT_CONFIG_FOLDER_PATH);
|
||||
@ -258,22 +266,34 @@ final class ReportingConfigLoader {
|
||||
|
||||
return reportNameList;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns whether or not a config with the given name exists. The config is
|
||||
* assumed to exist if there is a folder in
|
||||
* assumed to exist if there is a folder in
|
||||
* ReportingConfigLoader.REPORT_CONFIG_FOLDER_PATH with the given name.
|
||||
*
|
||||
*
|
||||
* @param configName Name of the report config.
|
||||
*
|
||||
*
|
||||
* @return True if the report config exists.
|
||||
*/
|
||||
static synchronized boolean configExists(String configName) {
|
||||
// construct the configuration directory path
|
||||
Path reportDirPath = Paths.get(ReportingConfigLoader.REPORT_CONFIG_FOLDER_PATH, configName);
|
||||
File reportDirectory = reportDirPath.toFile();
|
||||
|
||||
|
||||
return reportDirectory.exists();
|
||||
}
|
||||
|
||||
static void upgradeConfig() throws IOException {
|
||||
File oldPath = new File(REPORT_CONFIG_FOLDER_PATH_LEGACY);
|
||||
File newPath = new File(REPORT_CONFIG_FOLDER_PATH);
|
||||
|
||||
if (oldPath.exists() && Files.list(oldPath.toPath()).findFirst().isPresent()
|
||||
&& (!newPath.exists() || !Files.list(newPath.toPath()).findFirst().isPresent())) {
|
||||
newPath.mkdirs();
|
||||
FileUtils.copyDirectory(oldPath, newPath);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -19,7 +19,7 @@
|
||||
package org.sleuthkit.autopsy.texttranslation.translators;
|
||||
|
||||
import java.nio.file.Paths;
|
||||
import org.sleuthkit.autopsy.coreutils.PlatformUtil;
|
||||
import org.sleuthkit.autopsy.core.configpath.SharedConfigPath;
|
||||
|
||||
/**
|
||||
* ModuleSettings keys and paths for translator settings.
|
||||
@ -27,7 +27,7 @@ import org.sleuthkit.autopsy.coreutils.PlatformUtil;
|
||||
class TranslatorSettings {
|
||||
|
||||
private static final String TRANSLATION_FOLDER = "Translation";
|
||||
private static final String TRANSLATION_PATH = Paths.get(PlatformUtil.getUserConfigDirectory(), TRANSLATION_FOLDER).toString();
|
||||
private static final String TRANSLATION_PATH = Paths.get(SharedConfigPath.getInstance().getSharedConfigPath(), TRANSLATION_FOLDER).toString();
|
||||
|
||||
private static TranslatorSettings instance = new TranslatorSettings();
|
||||
|
||||
@ -50,7 +50,7 @@ class TranslatorSettings {
|
||||
* @return The resource name to use with ModuleSettings.
|
||||
*/
|
||||
String getModuleSettingsResource(String translationResource) {
|
||||
return Paths.get(TRANSLATION_FOLDER, translationResource).toString();
|
||||
return Paths.get(SharedConfigPath.getInstance().getSharedConfigFolder(), TRANSLATION_FOLDER, translationResource).toString();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -92,10 +92,11 @@ public class SharedConfiguration {
|
||||
private static final String INGEST_MODULES_REL_PATH = new File(moduleDirPath).toURI().relativize(new File(INGEST_MODULES_PATH).toURI()).getPath();
|
||||
private static final Logger logger = Logger.getLogger(SharedConfiguration.class.getName());
|
||||
private static final String CENTRAL_REPO_DIR_PATH = Paths.get(SHARED_DIR_PATH, "CentralRepository").toAbsolutePath().toString();
|
||||
private static final String VIEW_PREFERENCE_FILE = Paths.get(SHARED_DIR_PATH, "ViewPreferences").toAbsolutePath().toString();
|
||||
private static final String MACHINE_SPECIFIC_PREFERENCE_FILE = Paths.get(moduleDirPath, "MachineSpecificPreferences").toAbsolutePath().toString();
|
||||
private static final String MODE_PREFERENCE_FILE = Paths.get(moduleDirPath, "ModePreferences").toAbsolutePath().toString();
|
||||
private static final String EXTERNAL_SERVICE_PREFERENCE_FILE = Paths.get(moduleDirPath, "ExternalServicePreferences").toAbsolutePath().toString();
|
||||
private static final String HASH_SETTINGS_PATH = Paths.get(SHARED_DIR_PATH, "HashLookup").toAbsolutePath().toString();
|
||||
private static final String VIEW_PREFERENCE_FILE = "ViewPreferences.properties";
|
||||
private static final String MACHINE_SPECIFIC_PREFERENCE_FILE = "MachineSpecificPreferences.properties";
|
||||
private static final String MODE_PREFERENCE_FILE = "ModePreferences.properties";
|
||||
private static final String EXTERNAL_SERVICE_PREFERENCE_FILE = "ExternalServicePreferences.properties";
|
||||
|
||||
|
||||
private final UpdateConfigSwingWorker swingWorker;
|
||||
@ -1000,8 +1001,8 @@ public class SharedConfiguration {
|
||||
Map<String, String> sharedVersions = readVersionsFromFile(sharedVersionFile);
|
||||
|
||||
// Copy the settings file
|
||||
copyToRemoteFolder(HASHDB_CONFIG_FILE_NAME, SHARED_DIR_PATH, remoteFolder, true);
|
||||
copyToRemoteFolder(HASHDB_CONFIG_FILE_NAME_LEGACY, moduleDirPath, remoteFolder, true);
|
||||
copyToRemoteFolder(HASHDB_CONFIG_FILE_NAME, HASH_SETTINGS_PATH, remoteFolder, true);
|
||||
copyToRemoteFolder(HASHDB_CONFIG_FILE_NAME_LEGACY, HASH_SETTINGS_PATH, remoteFolder, true);
|
||||
|
||||
// Get the list of databases from the file
|
||||
List<String> databases = getHashFileNamesFromSettingsFile();
|
||||
@ -1249,8 +1250,8 @@ public class SharedConfiguration {
|
||||
}
|
||||
|
||||
// Copy the settings filey
|
||||
copyToLocalFolder(HASHDB_CONFIG_FILE_NAME, SHARED_DIR_PATH, remoteFolder, true);
|
||||
copyToLocalFolder(HASHDB_CONFIG_FILE_NAME_LEGACY, moduleDirPath, remoteFolder, true);
|
||||
copyToLocalFolder(HASHDB_CONFIG_FILE_NAME, HASH_SETTINGS_PATH, remoteFolder, true);
|
||||
copyToLocalFolder(HASHDB_CONFIG_FILE_NAME_LEGACY, HASH_SETTINGS_PATH, remoteFolder, true);
|
||||
copyToLocalFolder(SHARED_CONFIG_VERSIONS, moduleDirPath, remoteFolder, true);
|
||||
|
||||
// Refresh HashDbManager with the new settings
|
||||
|
Loading…
x
Reference in New Issue
Block a user