diff --git a/apps/routerconsole/jsp/configclients.jsp b/apps/routerconsole/jsp/configclients.jsp index 45bafda37d..ef62974b71 100644 --- a/apps/routerconsole/jsp/configclients.jsp +++ b/apps/routerconsole/jsp/configclients.jsp @@ -30,8 +30,20 @@ input.default { width: 1px; height: 1px; visibility: hidden; }

<%=intl._t("Client Configuration")%>

<%=intl._t("The Java clients listed below are started by the router and run in the same JVM.")%>  - <%=intl._t("To change other client options, edit the file")%> - <%=net.i2p.router.startup.ClientAppConfig.configFile(net.i2p.I2PAppContext.getGlobalContext()).getAbsolutePath()%>. +<% + if (!clientshelper.isAdvanced()) { + net.i2p.I2PAppContext ctx = net.i2p.I2PAppContext.getGlobalContext(); + if (net.i2p.router.startup.ClientAppConfig.isSplitConfig(ctx)) { +%> + <%=intl._t("To change client options, edit the files in the directory {0}.", "" + net.i2p.router.startup.ClientAppConfig.configDir(ctx).getAbsolutePath() + "")%> +<% + } else { +%> + <%=intl._t("To change client options, edit the file {0}.", "" + net.i2p.router.startup.ClientAppConfig.configFile(ctx).getAbsolutePath() + "")%> +<% + } + } // !isAdvanced() +%> <%=intl._t("All changes require restart to take effect.")%>

diff --git a/router/java/src/net/i2p/router/startup/ClientAppConfig.java b/router/java/src/net/i2p/router/startup/ClientAppConfig.java index 266054cec4..538aca09d3 100644 --- a/router/java/src/net/i2p/router/startup/ClientAppConfig.java +++ b/router/java/src/net/i2p/router/startup/ClientAppConfig.java @@ -118,7 +118,7 @@ public class ClientAppConfig { * Only valid after getClientApps(ctx) has been called. * @since 0.9.42 */ - public synchronized static boolean isSplitConfig(RouterContext ctx) { + public synchronized static boolean isSplitConfig(I2PAppContext ctx) { File dir = new File(ctx.getConfigDir(), CLIENT_CONFIG_DIR); return dir.exists() && !configFile(ctx).exists(); } @@ -134,6 +134,14 @@ public class ClientAppConfig { return cfgFile; } + /* + * This is the config dir. Only valid if a split config. + * @since 0.9.48 + */ + public static File configDir(I2PAppContext ctx) { + return new File(ctx.getConfigDir(), CLIENT_CONFIG_DIR); + } + /* * Go through the files, and return a List of ClientAppConfig structures * This is for the router.