Skip to content

Commit 295bfcd

Browse files
committed
1 parent aa3e1df commit 295bfcd

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

runtimes/bundles/org.jboss.tools.rsp.server.wildfly/src/main/java/org/jboss/tools/rsp/server/wildfly/servertype/actions/EditServerConfigurationActionHandler.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,20 @@ protected String getConfigurationFile() {
7777
// this may need changing if we allow them to set their configuration folder
7878
// but for now it is ok
7979
String home = wildFlyServerDelegate.getServer().getAttribute(IJBossServerAttributes.SERVER_HOME, (String)null);
80+
String base = wildFlyServerDelegate.getServer().getAttribute(IJBossServerAttributes.SERVER_BASE_DIR, (String)null);
8081
String configFile = wildFlyServerDelegate.getServer().getAttribute(IJBossServerAttributes.WILDFLY_CONFIG_FILE,
8182
IJBossServerAttributes.WILDFLY_CONFIG_FILE_DEFAULT);
82-
IPath configFilePath = new Path(home).append("standalone").append("configuration").append(configFile);
83+
IPath homePath = new Path(home);
84+
IPath baseToUse = homePath.append("standalone");
85+
if( base != null ) {
86+
IPath basePath = new Path(base);
87+
if( basePath.isAbsolute()) {
88+
baseToUse = basePath;
89+
} else {
90+
baseToUse = homePath.append(base);
91+
}
92+
}
93+
IPath configFilePath = baseToUse.append("configuration").append(configFile);
8394
return configFilePath.toOSString();
8495
}
8596

0 commit comments

Comments
 (0)