mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2024-10-23 05:31:02 +00:00
GP-693 revised ServerAdmin to restore ability to specify repositories
root used during testing
This commit is contained in:
parent
fe0f67cd5e
commit
2df5abb461
|
@ -417,19 +417,32 @@ public class ServerAdmin implements GhidraLaunchable {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse contents of specified configFilePath as server.conf to determine
|
||||
* repositories root directory. If configFilePath corresponds to a directory,
|
||||
* that directory will be treated as the repositories root directory.
|
||||
* @param configFilePath path to server.conf or repositories root directory
|
||||
* @return repositories root directory
|
||||
*/
|
||||
private File getServerDirFromConfig(String configFilePath) {
|
||||
System.out.println("Using config file: " + configFilePath);
|
||||
|
||||
if (configFilePath == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
File configFile = new File(configFilePath);
|
||||
|
||||
if (!configFile.exists()) {
|
||||
System.out.println("Config file not found: " + configFile.getAbsolutePath());
|
||||
return null;
|
||||
}
|
||||
|
||||
if (configFile.isDirectory()) {
|
||||
// If specified path is a directory treat as the server root
|
||||
return configFile;
|
||||
}
|
||||
|
||||
System.out.println("Using config file: " + configFilePath);
|
||||
|
||||
Properties config = new Properties();
|
||||
InputStream in = null;
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue
Block a user